Re: [PATCH v3 2/3] iio: proximity: add driver for Sharp GP2AP070S proximity sensor

David Lechner <[email protected]>
Newsgroups gmane.linux.kernel.samsung-soc,gmane.linux.kernel.iio,gmane.linux.drivers.devicetree,gmane.linux.kernel,gmane.linux.ports.arm.kernel
Message-ID <[email protected]>
On 8/3/26 12:28 PM, Kaustabh Chakraborty wrote:
> On 2026-08-01 11:41 -05:00, David Lechner wrote:
>> On 7/30/26 3:07 PM, Kaustabh Chakraborty wrote:
>>> The GP2AP070S is a proximity sensor designed and manufactured by Sharp
>>> Corporation. This sensor is used in mobile devices, including, but not
>>> limited to - the Samsung Galaxy J6.
>>>
>>> The driver has been adopted from Samsung's downstream kernel
>>> implementation [1]. Due to the lack of public documentation about the
>>> schematics of this device. The downstream driver acts as the secondary
>>> source of information. Driver clarity has also been improved with the
>>> help of the GP2AP* drivers in iio/light.
>>>
>>> Link: https://github.com/Exynos7870/android_kernel_samsung_universal7870/blob/lineage-16.0/drivers/sensors/gp2ap070s.c [1]
>>> Signed-off-by: Kaustabh Chakraborty <[email protected]>
>>> ---
> 
> [...]
> 
>>> +static void gp2ap070s_reset_action(void *private)
>>> +{
>>> +	struct gp2ap070s_drvdata *drvdata = private;
>>
>> Usually, we don't bother with a cast/local variable in these.
>> The void* can be passed directly as an arg.
> 
> Yeah, but CFI will not be happy about that.

How so? We do this all the time and no one has reported any
issues with it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.