Add basic support for i3c bus. This is a simple implementation that only give support for SDR Read and Write commands.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -25,6 +25,7 @@ struct module; · 24 unmodified lines | ||
| 25 | 25 | struct clk; |
| 26 | 26 | struct device; |
| 27 | 27 | struct i2c_client; |
| 28 | +struct i3c_device; | |
| 28 | 29 | struct irq_domain; |
| 29 | 30 | struct slim_device; |
| 30 | 31 | struct spi_device; |
| @@ -624,6 +625,10 @@ struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus, · 593 unmodified lines | ||
| 624 | 625 | const struct regmap_config *config, |
| 625 | 626 | struct lock_class_key *lock_key, |
| 626 | 627 | const char *lock_name); |
| 628 | +struct regmap *__devm_regmap_init_i3c(struct i3c_device *i3c, | |
| 629 | + const struct regmap_config *config, | |
| 630 | + struct lock_class_key *lock_key, | |
| 631 | + const char *lock_name); | |
| 627 | 632 | /* |
| 628 | 633 | * Wrapper for regmap_init macros to include a unique lockdep key and name |
| 629 | 634 | * for each call. No-op if CONFIG_LOCKDEP is not set. |
| @@ -982,6 +987,21 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg); · 352 unmodified lines | ||
| 982 | 987 | #define devm_regmap_init_slimbus(slimbus, config) \ |
| 983 | 988 | __regmap_lockdep_wrapper(__devm_regmap_init_slimbus, #config, \ |
| 984 | 989 | slimbus, config) |
| 990 | + | |
| 991 | +/** | |
| 992 | + * devm_regmap_init_i3c() - Initialise managed register map | |
| 993 | + * | |
| 994 | + * @i3c: Device that will be interacted with | |
| 995 | + * @config: Configuration for register map | |
| 996 | + * | |
| 997 | + * The return value will be an ERR_PTR() on error or a valid pointer | |
| 998 | + * to a struct regmap. The regmap will be automatically freed by the | |
| 999 | + * device management code. | |
| 1000 | + */ | |
| 1001 | +#define devm_regmap_init_i3c(i3c, config) \ | |
| 1002 | + __regmap_lockdep_wrapper(__devm_regmap_init_i3c, #config, \ | |
| 1003 | + i3c, config) | |
| 1004 | + | |
| 985 | 1005 | int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk); |
| 986 | 1006 | void regmap_mmio_detach_clk(struct regmap *map); |
| 987 | 1007 | void regmap_exit(struct regmap *map); |