Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1234272
| From | Grygorii Strashko <grygorii.strashko@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC |
| Date | 2015-09-28 18:10 +0200 |
| Message-ID | <qdJa2-4l8-35@gated-at.bofh.it> (permalink) |
| References | <qcga6-6cP-9@gated-at.bofh.it> <qcga7-6cP-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 09/24/2015 09:52 AM, Andrew F. Davis wrote:
> This patch adds support for TPS65912 mfd device. It provides
> communication through the I2C and SPI interfaces. It contains
> the following components:
>
> - Regulators
> - GPIO controller
>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> ---
> drivers/mfd/Kconfig | 24 +++
> drivers/mfd/Makefile | 3 +
> drivers/mfd/tps65912-core.c | 114 +++++++++++++
> drivers/mfd/tps65912-i2c.c | 86 ++++++++++
> drivers/mfd/tps65912-spi.c | 85 ++++++++++
> include/linux/mfd/tps65912.h | 393 +++++++++++++++++++++++++++++++++++++++++++
> 6 files changed, 705 insertions(+)
> create mode 100644 drivers/mfd/tps65912-core.c
> create mode 100644 drivers/mfd/tps65912-i2c.c
> create mode 100644 drivers/mfd/tps65912-spi.c
> create mode 100644 include/linux/mfd/tps65912.h
>
[...]
> +
> +/*
> + * struct tps_info - packages regulator constraints
> + * @id: Id of the regulator
> + * @name: Voltage regulator name
> + * @min_uV: Minimum micro volts
> + * @max_uV: Minimum micro volts
> + *
> + * This data is used to check the regulator voltage limits while setting.
> + */
> +struct tps_info {
> + int id;
> + const char *name;
> + int min_uV;
> + int max_uV;
> +};
Could you move structure's definitions to the corresponding c-files
if they are used only locally in this files, pls?
> +
> +/*
> + * struct tps65912 - state holder for the tps65912 driver
> + *
> + * Device data may be used to access the TPS65912 chip
> + */
> +struct tps65912 {
> + struct device *dev;
> + unsigned int id;
> +
> + /* IRQ Data */
> + int irq;
> + struct regmap_irq_chip_data *irq_data;
> +
> + struct regulator_desc desc[TPS65912_NUM_REGULATOR];
> + struct tps_info *info[TPS65912_NUM_REGULATOR];
seems above two field are not used (and id?).
> + struct regmap *regmap;
> +};
> +
> +static const struct regmap_range tps65912_yes_ranges[] = {
> + regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
> +};
> +
> +static const struct regmap_access_table tps65912_volatile_table = {
> + .yes_ranges = tps65912_yes_ranges,
> + .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
> +};
> +
> +static const struct regmap_config tps65912_regmap_co nfig = {
> + .reg_bits = 8,
> + .val_bits = 8,
> + .cache_type = REGCACHE_RBTREE,
> + .volatile_table = &tps65912_volatile_table,
> +};
> +
> +int tps65912_device_init(struct tps65912 *tps);
> +int tps65912_device_exit(struct tps65912 *tps);
> +
> +#endif /* __LINUX_MFD_TPS65912_H */
>
--
regards,
-grygorii
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-09-24 17:00 +0200
Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC Lee Jones <lee.jones@linaro.org> - 2015-09-25 19:00 +0200
Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-09-25 21:20 +0200
Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC Lee Jones <lee.jones@linaro.org> - 2015-09-25 23:30 +0200
Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-09-28 17:50 +0200
Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC Lee Jones <lee.jones@linaro.org> - 2015-09-29 09:20 +0200
Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-09-29 18:00 +0200
Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC Grygorii Strashko <grygorii.strashko@ti.com> - 2015-09-28 18:10 +0200
Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-09-29 20:20 +0200
csiph-web