Re: [PATCH v3 1/6] mfd: max77843: Add max77843 MFD driver core driver

From: Krzysztof KozÅowski
Date: Mon Feb 16 2015 - 09:02:38 EST


2015-02-16 14:51 GMT+01:00 Lee Jones <lee.jones@xxxxxxxxxx>:
> On Wed, 04 Feb 2015, Jaewon Kim wrote:
>
>> This patch adds MAX77843 core/irq driver to support PMIC,
>> MUIC(Micro USB Interface Controller), Charger, Fuel Gauge,
>> LED and Haptic device.
>>
>> Cc: Lee Jones <lee.jones@xxxxxxxxxx>
>> Signed-off-by: Jaewon Kim <jaewon02.kim@xxxxxxxxxxx>
>> Signed-off-by: Beomho Seo <beomho.seo@xxxxxxxxxxx>
>> ---
>> drivers/mfd/Kconfig | 14 ++
>> drivers/mfd/Makefile | 1 +
>> drivers/mfd/max77843.c | 245 +++++++++++++++++++
>> include/linux/mfd/max77843-private.h | 441 ++++++++++++++++++++++++++++++++++
>> 4 files changed, 701 insertions(+)
>> create mode 100644 drivers/mfd/max77843.c
>> create mode 100644 include/linux/mfd/max77843-private.h
>>
>> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
>> index 2e6b731..0c67c79 100644
>> --- a/drivers/mfd/Kconfig
>> +++ b/drivers/mfd/Kconfig
>> @@ -442,6 +442,20 @@ config MFD_MAX77693
>> additional drivers must be enabled in order to use the functionality
>> of the device.
>>
>> +config MFD_MAX77843
>> + bool "Maxim Semiconductor MAX77843 PMIC Support"
>> + depends on I2C=y
>> + select MFD_CORE
>> + select REGMAP_I2C
>> + select REGMAP_IRQ
>> + help
>> + Say yes here to add support for Maxim Semiconductor MAX77843.
>> + This is companion Power Management IC with LEDs, Haptic, Charger,
>> + Fuel Gauge, MUIC(Micro USB Interface Controller) controls on chip.
>> + This driver provides common support for accessing the device;
>> + additional drivers must be enabled in order to use the functionality
>> + of the device.
>> +
>> config MFD_MAX8907
>> tristate "Maxim Semiconductor MAX8907 PMIC Support"
>> select MFD_CORE
>> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
>> index 53467e2..fe4f75c 100644
>> --- a/drivers/mfd/Makefile
>> +++ b/drivers/mfd/Makefile
>> @@ -117,6 +117,7 @@ obj-$(CONFIG_MFD_DA9063) += da9063.o
>> obj-$(CONFIG_MFD_MAX14577) += max14577.o
>> obj-$(CONFIG_MFD_MAX77686) += max77686.o
>> obj-$(CONFIG_MFD_MAX77693) += max77693.o
>> +obj-$(CONFIG_MFD_MAX77843) += max77843.o
>
> This is the 11th MAX driver. Can't they be supported using device
> specific data structures instead of taking a 'one file per device'
> approach?

We did this for max14577+max77836 and max77686+max77802. I didn't see
the specs of max77843 but I think in many cases other and newer
drivers could be merged. Someone needs to advocate for this...

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/