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  linux-cve-announce  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]
Message-Id: <71F3BE12-FFC9-4771-BF48-ABAC3ACEF4AD@goldelico.com>
Date:	Fri, 15 Jul 2016 10:08:33 +0200
From:	"H. Nikolaus Schaller" <hns@...delico.com>
To:	Jacek Anaszewski <jacek.anaszewski@...il.com>,
	David Rivshin <drivshin@...worx.com>
Cc:	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>,
	Richard Purdie <rpurdie@...ys.net>,
	Jacek Anaszewski <j.anaszewski@...sung.com>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-leds@...r.kernel.org, kernel@...a-handheld.com,
	marek@...delico.com, letux-kernel@...nphoenux.org,
	Andrey Utkin <andrey_utkin@...tmail.com>
Subject: Re: [PATCH v3 1/2] drivers: led: is31fl319x: 1/3/6/9-channel light effect led driver

Hi Jacek,

> Am 12.07.2016 um 22:14 schrieb Jacek Anaszewski <jacek.anaszewski@...il.com>:
> 
>> 
>> +
>> +/*
>> + * regmap is used as a cache of chip's register space,
>> + * to avoid reading back brightness values from chip,
>> + * which is known to hang.
>> + */
>> +struct is31fl319x_chip {
>> +	struct i2c_client       *client;
>> +	struct regmap           *regmap;
>> +	struct mutex            lock;
>> +	u32                     audio_gain_db;
>> +
>> +	struct is31fl319x_led {
>> +		struct is31fl319x_chip  *chip;
>> +		struct led_classdev     cdev;
>> +		u32                     max_microamp;
>> +		bool                    configured;
>> +	} leds[NUM_LEDS];
>> +};
>> +
>> +static const struct i2c_device_id is31fl319x_id[] = {
>> +	{ "is31fl3190", 1 },
>> +	{ "is31fl3191", 1 },
>> +	{ "is31fl3193", 3 },
>> +	{ "is31fl3196", 6 },
>> +	{ "is31fl3199", 9 },
>> +	{ "sn3199", 9 },
>> +	{ }
>> +};
>> +MODULE_DEVICE_TABLE(i2c, is31fl319x_id);
> 
> This is redundant - you have this info in of_is31fl319x_leds_match,
> and you can obtain it with of_match_device().
> Please compare drivers/leds/leds-is31fl32xx.c.

we have tried like is31fl32xx.c but it does not automatically load the driver
if compiled as module (like all other I2C clients do). Reason seems to
be that there is no i2c information in modalias database any more.

So perhaps the i31fl32 approach is also incomplete. Has it been tested
with loadable modules?

And, there is a bug/typo in the fl32 driver:

http://lxr.free-electrons.com/source/drivers/leds/leds-is31fl32xx.c#L425

static const struct i2c_device_id is31fl31xx_id[] = {

s/fl31/fl32/ is31fl32xx.c

BR and thanks,
Nikolaus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ