lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 21 Mar 2014 09:22:59 +0100
From:	Jacek Anaszewski <j.anaszewski@...sung.com>
To:	Lee Jones <lee.jones@...aro.org>
Cc:	linux-media@...r.kernel.org, linux-leds@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	s.nawrocki@...sung.com, a.hajda@...sung.com,
	kyungmin.park@...sung.com, Bryan Wu <cooloney@...il.com>,
	Richard Purdie <rpurdie@...ys.net>,
	SangYoung Son <hello.son@...sung.com>,
	Samuel Ortiz <sameo@...ux.intel.com>
Subject: Re: [PATCH/RFC 6/8] leds: Add support for max77693 mfd flash cell

On 03/20/2014 04:34 PM, Lee Jones wrote:
> On Thu, 20 Mar 2014, Jacek Anaszewski wrote:
>
>> 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@...sung.com>
>> Signed-off-by: Jacek Anaszewski <j.anaszewski@...sung.com>
>> Acked-by: Kyungmin Park <kyungmin.park@...sung.com>
>> Cc: Bryan Wu <cooloney@...il.com>
>> Cc: Richard Purdie <rpurdie@...ys.net>
>> Cc: SangYoung Son <hello.son@...sung.com>
>> Cc: Samuel Ortiz <sameo@...ux.intel.com>
>> Cc: Lee Jones <lee.jones@...aro.org>
>> ---
>>   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
>
> [...]
>
>> diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c
>> index c5535f0..6fa92d3 100644
>> --- a/drivers/mfd/max77693.c
>> +++ b/drivers/mfd/max77693.c
>> @@ -41,12 +41,21 @@
>>   #define I2C_ADDR_MUIC	(0x4A >> 1)
>>   #define I2C_ADDR_HAPTIC	(0x90 >> 1)
>>
>> -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.

Thanks,
Jacek Anaszewski
--
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