From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grygorii Strashko Subject: Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC Date: Mon, 28 Sep 2015 11:01:11 -0500 Message-ID: <56096447.8020804@ti.com> References: <1443106374-4126-1-git-send-email-afd@ti.com> <1443106374-4126-4-git-send-email-afd@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Return-path: Received: from devils.ext.ti.com ([198.47.26.153]:38940 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754899AbbI1QB0 (ORCPT ); Mon, 28 Sep 2015 12:01:26 -0400 In-Reply-To: <1443106374-4126-4-git-send-email-afd@ti.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: "Andrew F. Davis" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Lee Jones , Mark Brown , Linus Walleij , Alexandre Courbot , Samuel Ortiz , Liam Girdwood Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org 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 > --- > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934303AbbI1QB2 (ORCPT ); Mon, 28 Sep 2015 12:01:28 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:38940 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754899AbbI1QB0 (ORCPT ); Mon, 28 Sep 2015 12:01:26 -0400 Subject: Re: [PATCH v3 3/5] mfd: tps65912: Add driver for the TPS65912 PMIC To: "Andrew F. Davis" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Lee Jones , Mark Brown , Linus Walleij , Alexandre Courbot , Samuel Ortiz , Liam Girdwood References: <1443106374-4126-1-git-send-email-afd@ti.com> <1443106374-4126-4-git-send-email-afd@ti.com> CC: , , From: Grygorii Strashko Message-ID: <56096447.8020804@ti.com> Date: Mon, 28 Sep 2015 11:01:11 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1443106374-4126-4-git-send-email-afd@ti.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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