From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 533602D23A6 for ; Mon, 3 Aug 2026 19:19:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785784748; cv=none; b=HwPKKMJSYVhXFUsXhecizMeV6fJc3/qj/Bv5nuZ28zbE1SJRn5Lvtjza9og2wdkBZV0i9ky9ujJ2TyG3qkHTqD/K6Pfruw+9Siqx/+uu/Mg/aiVjSpPmKcxx+d4oD536ZY8/hg9Zo63gcOI3Fdk+dj/jb0wO4mdN7yO0cuk/Hx4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785784748; c=relaxed/simple; bh=XKGpIuuo6O7kytNhl1VQHpUrM4ZOOWo1SPMYBBVs6II=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kVS/7XUAuTNHPzwayTywscukhM6lJCQP/QDqwnm6EJPuQSvGGYmeWVWHqWIy8KEH68b432WvCjrUDXfOcUJFzIwD1Gf3Fc0zyS0MzbpxFo+DMIzxRMpyz5SbaKVOK0+3UD+oFkZuZKCjDcCiZu+XoDHwjIYEiNk767dky7gixpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=JXLjOkjp; arc=none smtp.client-ip=209.85.210.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="JXLjOkjp" Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-7e6128bd9b3so1717415a34.1 for ; Mon, 03 Aug 2026 12:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1785784746; x=1786389546; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yWhNVuNUeWmdXxG9AxDJ/JJjMmObR+VfZMlaxit4KDY=; b=JXLjOkjpHi/6ZWmjmMBoEESXRWepX3ZOvDaY4mrOMUBTjoUIS3tLo7ow4BnDmnwVNX wCY/YaFC8m6T6m5W3q+hjHv28M5Dc64RIxEBWeiwSp4ScUNFuAtZuEtNJJom5Aq0+E0x tb7gLKEvGoQfcE1qfNIBfL17+dWgGaggg4FoA2mxZZkK+yF+o/c/3oc08D0Yr9B2KXsH VJ5G4wDQox229F/K4ctg6h55UM6tPgSWzUscigkGznU+DGj8iIYiF2RdKjCHLvSUBDJS z+s9TctSQbQKczb4NiJ4xztZfblwMJXH9hp33O1ZMYuOmbXlaU7ikmTp3/Bpp1p9vcRq adNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785784746; x=1786389546; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=yWhNVuNUeWmdXxG9AxDJ/JJjMmObR+VfZMlaxit4KDY=; b=tRv2H77+O0QEKmaPExHPZH88iHmx8sqOc873vnIq64TtN1gWwN+tUQpiShoCZ2lkuv DZUK6Pdp1FuGGGRRPn73/4wIjZheP/eJCvkDksC82vaehJ9AY7Tq7UGVh91VhjSwEOaa 8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with SMTP id 46e09a7af769-7f196b61346mr16269729a34.1.1785784741332; Mon, 03 Aug 2026 12:19:01 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:b8f7:1f5e:7c:a7d1? ([2600:8803:e7e4:500:b8f7:1f5e:7c:a7d1]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7f18f11e522sm8029109a34.25.2026.08.03.12.19.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Aug 2026 12:19:00 -0700 (PDT) Message-ID: <43059ed9-2ff8-4bf3-846a-53a4c7cd72bd@baylibre.com> Date: Mon, 3 Aug 2026 14:18:59 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/3] iio: proximity: add driver for Sharp GP2AP070S proximity sensor To: Kaustabh Chakraborty , Jonathan Cameron , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peter Griffin , Alim Akhtar Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org References: <20260731-gp2ap070s-v3-0-d1f5cecf9fe7@disroot.org> <20260731-gp2ap070s-v3-2-d1f5cecf9fe7@disroot.org> <380b864f-6266-40fb-87a4-027afb422885@baylibre.com> Content-Language: en-US From: David Lechner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 >>> --- > > [...] > >>> +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.