[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <560AD584.6000906@ti.com>
Date: Tue, 29 Sep 2015 13:16:36 -0500
From: "Andrew F. Davis" <afd@...com>
To: Grygorii Strashko <grygorii.strashko@...com>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Lee Jones <lee.jones@...aro.org>,
Mark Brown <broonie@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
Samuel Ortiz <sameo@...ux.intel.com>,
Liam Girdwood <lgirdwood@...il.com>
CC: <linux-gpio@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC
On 09/28/2015 11:01 AM, Grygorii Strashko wrote:
> 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@...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?
>
ACK
>> +
>> +/*
>> + * 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?).
>
The idea was for a someday use, but because I never did that I'll
remove them for now.
Thanks,
Andrew
>> + 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 */
>>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists