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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <544253F3.9060002@metafoo.de>
Date:	Sat, 18 Oct 2014 13:50:11 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Jonathan Cameron <jic23@...nel.org>,
	"Ivan T. Ivanov" <iivanov@...sol.com>
CC:	Sachin Kamat <sachin.kamat@...aro.org>,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
	John Stultz <john.stultz@...aro.org>,
	linux-iio@...r.kernel.org, svarbanov@...sol.com,
	linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH] iio: inkern: Add of_xlate function to struct iio_dev

On 10/18/2014 01:42 PM, Jonathan Cameron wrote:
> On 02/10/14 13:32, Ivan T. Ivanov wrote:
>> When #iio-cells is greater than '0', the driver could provide
>> a custom of_xlate function that reads the *args* and returns
>> the appropriate index in registered IIO channels array.
>>
>> Add simple translation function, suitable for the most 1:1
>> mapped channels in IIO chips, and use it when driver did not
>> provide custom implementation.
>>
>> Signed-off-by: Ivan T. Ivanov <iivanov@...sol.com>
> Any more comments on this?  Been sat a while and the discussions seems
> to have died out.
>
> As Ivan has pointed out, very similar approaches are used
> elsewhere (gpio for example).

Looks good to me:

Reviewed-by: Lars-Peter Clausen <lars@...afoo.de>

When we initially added the DT support to IIO I was hoping that we can get 
away with just using the simple and generic xlate function for all devices. 
But it looks as if some more complex devices need to overwrite it. We should 
be careful about adding new driver specific xlate implementations and make 
sure that it is actually needed.

One thing we might want to consider though is instead of adding the xlate 
callback to the iio_dev struct add it to the iio_info struct since it should 
be the same for different device instances of the same driver. And this is 
also where all the other callbacks are.

- Lars
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ