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

From: Kaustabh Chakraborty

Date: Mon Aug 03 2026 - 13:37:46 EST


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 <kauschluss@xxxxxxxxxxx>
>> ---

[...]

>> +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.