diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-25 04:12:23 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-25 04:12:23 +0300 |
commit | 008128cd5948bd3589a9c300e426af4d834029bb (patch) | |
tree | bbcb4308c9d7004ced3bd87ca213d60a8760753e /include/linux/pinctrl | |
parent | 39f013440dbf5b1f209eadb3b4665d4f0e840b5b (diff) | |
parent | e8444bb9fd77f153adcc263eab28e3c2bc1cf540 (diff) | |
download | linux-008128cd5948bd3589a9c300e426af4d834029bb.tar.xz |
Merge tag 'i2c-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang:
- new drivers for HPE GXP and Loongson 2K/LS7A
- bigger refactorings for i801 and xiic
- gpio driver gained ACPI and SDA-write only support
- the core converted some OF helpers to fwnode helpers
- usual bunch of driver updates
* tag 'i2c-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (52 commits)
MAINTAINERS: Add HPE GXP I2C Support
i2c: Add GXP SoC I2C Controller
dt-bindings: i2c: Add hpe,gxp-i2c
i2c: xiic: Remove some dead code
i2c: xiic: Add SCL frequency configuration support
i2c: xiic: Update compatible with new IP version
dt-bindings: i2c: xiic: Add 'xlnx,axi-iic-2.1' to compatible
i2c: i801: Call i801_check_post() from i801_access()
i2c: i801: Call i801_check_pre() from i801_access()
i2c: i801: Centralize configuring block commands in i801_block_transaction
i2c: i801: Centralize configuring non-block commands in i801_simple_transaction
i2c: i801: Handle SMBAUXCTL_E32B in i801_block_transaction_by_block only
i2c: i801: Add i801_simple_transaction(), complementing i801_block_transaction()
Documentation: i2c: correct spelling
dt-bindings: i2c: i2c-st: convert to DT schema
i2c: i801: add helper i801_set_hstadd()
i2c: i801: make FEATURE_BLOCK_PROC dependent on FEATURE_BLOCK_BUFFER
i2c: i801: make FEATURE_HOST_NOTIFY dependent on FEATURE_IRQ
i2c: i801: improve interrupt handler
i2c: st: use pm_sleep_ptr to avoid ifdef CONFIG_PM_SLEEP
...
Diffstat (limited to 'include/linux/pinctrl')
-rw-r--r-- | include/linux/pinctrl/devinfo.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/pinctrl/devinfo.h b/include/linux/pinctrl/devinfo.h index 9e8b559e1253..bb6653af4f92 100644 --- a/include/linux/pinctrl/devinfo.h +++ b/include/linux/pinctrl/devinfo.h @@ -18,6 +18,8 @@ struct device; #ifdef CONFIG_PINCTRL +#include <linux/device.h> + /* The device core acts as a consumer toward pinctrl */ #include <linux/pinctrl/consumer.h> @@ -44,6 +46,14 @@ struct dev_pin_info { extern int pinctrl_bind_pins(struct device *dev); extern int pinctrl_init_done(struct device *dev); +static inline struct pinctrl *dev_pinctrl(struct device *dev) +{ + if (!dev->pins) + return NULL; + + return dev->pins->p; +} + #else /* Stubs if we're not using pinctrl */ @@ -58,5 +68,10 @@ static inline int pinctrl_init_done(struct device *dev) return 0; } +static inline struct pinctrl *dev_pinctrl(struct device *dev) +{ + return NULL; +} + #endif /* CONFIG_PINCTRL */ #endif /* PINCTRL_DEVINFO_H */ |