Re: [PATCH/RFC 6/8] leds: Add support for max77693 mfd flash cell

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> >>This patch adds led-flash support to Maxim max77693 chipset.
> >>Device can be exposed to user space through LED subsystem
> >>sysfs interface or through V4L2 subdevice when the support
> >>for Multimedia Framework is enabled. Device supports up to
> >>two leds which can work in flash and torch mode. Leds can
> >>be triggered externally or by software.
> >>
> >>Signed-off-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx>
> >>Signed-off-by: Jacek Anaszewski <j.anaszewski@xxxxxxxxxxx>
> >>Acked-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
> >>Cc: Bryan Wu <cooloney@xxxxxxxxx>
> >>Cc: Richard Purdie <rpurdie@xxxxxxxxx>
> >>Cc: SangYoung Son <hello.son@xxxxxxxxxxx>
> >>Cc: Samuel Ortiz <sameo@xxxxxxxxxxxxxxx>
> >>Cc: Lee Jones <lee.jones@xxxxxxxxxx>
> >>---
> >>  drivers/leds/Kconfig         |    9 +
> >>  drivers/leds/Makefile        |    1 +
> >>  drivers/leds/leds-max77693.c |  768 ++++++++++++++++++++++++++++++++++++++++++
> >>  drivers/mfd/max77693.c       |   21 +-
> >>  include/linux/mfd/max77693.h |   32 ++
> >>  5 files changed, 825 insertions(+), 6 deletions(-)
> >>  create mode 100644 drivers/leds/leds-max77693.c
> >
> >[...]
> >>-static const struct mfd_cell max77693_devs[] = {
> >>-	{ .name = "max77693-pmic", },
> >>-	{ .name = "max77693-charger", },
> >>-	{ .name = "max77693-flash", },
> >>-	{ .name = "max77693-muic", },
> >>-	{ .name = "max77693-haptic", },
> >>+enum mfd_devs_idx {
> >>+	IDX_PMIC,
> >>+	IDX_CHARGER,
> >>+	IDX_LED,
> >>+	IDX_MUIC,
> >>+	IDX_HAPTIC,
> >>+};
> >>+
> >>+static struct mfd_cell max77693_devs[] = {
> >>+	[IDX_PMIC]      = { .name = "max77693-pmic", },
> >>+	[IDX_CHARGER]   = { .name = "max77693-charger", },
> >>+	[IDX_LED]       = { .name = "max77693-led",
> >>+			    .of_compatible = "maxim,max77693-led"},
> >>+	[IDX_MUIC]      = { .name = "max77693-muic", },
> >>+	[IDX_HAPTIC]    = { .name = "max77693-haptic", },
> >>  };
> >
> >What is the purpose of this change?
> >
> Introducing mfd_devs_idx itself is a cosmetic change, which
> actually could be avoided. Initialization of the of_compatible field
> is required for the led driver to get matched properly. And as I've
> just realized also max77693-flash name should be preserved.
> I will fix this in the next version of the patch.

I'm happy with the addition of any .of_compatible strings, however
please leave out the IDXs in your next version(s).

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux