From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4224C20F068; Tue, 18 Mar 2025 15:16:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742310991; cv=none; b=oOgI93GRVm6jmmc+dL53A5qHjyFqTsPKHyR5qEjJCB9N04CHddCZGL+BTbb9h7ZS6qTXGjvAdQAZzoKoxyCKtIzD/pGEvqmdWosRjDNx2FUSpl4ULfWQfyr3KDVKbDkaRvkGj6PRnUw6hjwFkeC15PQJeo+82SY6CF+EX1ahiC0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742310991; c=relaxed/simple; bh=HAaoy8W1p/d3jl+bDZ7dDoAzsQebQi1OWxgFlqU0/Ns=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MZh7kpJw6C7i17dVDOymd7GkwKPo/aH0IGQQ5Is9Qy2g2/LPp8S9wq9jL6d6Sidf0ARyydrSzOIwni/6UUCCwAtho5U50CF+VjsfXOs3Oc07MkzP6maglr88eiQa4rVm1nUDx5emAg4rZrep7RVgDokwf1ndbmvbwFfzbCI14g8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H08YjFUM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H08YjFUM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65BADC4CEF6; Tue, 18 Mar 2025 15:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742310991; bh=HAaoy8W1p/d3jl+bDZ7dDoAzsQebQi1OWxgFlqU0/Ns=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=H08YjFUMAKjQmWe0Uzin0yDkN517R6wSum17fgcp1yoBtcB9/ZKbxYI6ZHv4iQxI8 pEHyJJ0oE7ZdoqiK54wGoVuFlsGW1iLqZJoCfrnB4f3ZxBu/AdREpAPScTumGKkc2z EYxc+V6jBkv2eRLdxW+K7JGLAAg7wJPVRhXgW6zfCZEgOMqDuqdbs0AqqtYkfuLg38 7h8EUzYOG699UYl/wg86RnrvKN3ydmVzspjo4fbjKOkIqCsiTYZx5OAxblUoMpvCIo KyrXsKGUNt8A2WheJ0zpm5mXyUYtqngfKi9XMrh6Yh1n9RAS9fEF37BY27IYT4VInY 9wXLqgyam8bwg== Message-ID: <8992a79d-0859-4d7f-9b47-52e20b11260a@kernel.org> Date: Tue, 18 Mar 2025 16:16:22 +0100 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] iio: light: bh1750: Add hardware reset support via GPIO To: =?UTF-8?Q?Sergio_P=C3=A9rez?= , linux-iio@vger.kernel.org Cc: tduszyns@gmail.com, jic23@kernel.org, lars@metafoo.de, robh@kernel.org, conor+dt@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20250316145514.627-1-sergio@pereznus.es> <01f48f6d-55a4-4dbe-b1ae-ef8c54dcc1ff@kernel.org> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJC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AhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmA872oFCRRflLYACgkQG5NDfTtBYpvScw/9GrqBrVLuJoJ52qBBKUBDo4E+5fU1bjt0 Gv0nh/hNJuecuRY6aemU6HOPNc2t8QHMSvwbSF+Vp9ZkOvrM36yUOufctoqON+wXrliEY0J4 ksR89ZILRRAold9Mh0YDqEJc1HmuxYLJ7lnbLYH1oui8bLbMBM8S2Uo9RKqV2GROLi44enVt vdrDvo+CxKj2K+d4cleCNiz5qbTxPUW/cgkwG0lJc4I4sso7l4XMDKn95c7JtNsuzqKvhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 18/03/2025 15:16, Sergio Pérez wrote: > Hello, > > El 17/03/2025 a las 8:24, Krzysztof Kozlowski escribió: >> On 16/03/2025 15:55, Sergio Perez wrote: >>> Some BH1750 sensors require a hardware reset before they can be >>> detected on the I2C bus. This patch adds support for an optional >>> reset GPIO that can be specified in the device tree. >>> >>> The reset sequence pulls the GPIO low and then high before >>> initializing the sensor, which enables proper detection with >>> tools like i2cdetect. >>> >>> Update the devicetree binding documentation to include the new >>> reset-gpios property with examples. >>> >>> Signed-off-by: Sergio Perez >> Please run scripts/checkpatch.pl and fix reported warnings. After that, >> run also `scripts/checkpatch.pl --strict` and (probably) fix more >> warnings. Some warnings can be ignored, especially from --strict run, >> but the code here looks like it needs a fix. Feel free to get in touch >> if the warning is not clear. You keep ignoring paragraphs. Did you read this? >> >>
>> Please use scripts/get_maintainers.pl to get a list of necessary people >> and lists to CC. It might happen, that command when run on an older >> kernel, gives you outdated entries. Therefore please be sure you base >> your patches on recent Linux kernel. >> >> Tools like b4 or scripts/get_maintainer.pl provide you proper list of >> people, so fix your workflow. Tools might also fail if you work on some >> ancient tree (don't, instead use mainline) or work on fork of kernel >> (don't, instead use mainline). Just use b4 and everything should be >> fine, although remember about `b4 prep --auto-to-cc` if you added new >> patches to the patchset. >> >> You missed at least devicetree list (maybe more), so this won't be >> tested by automated tooling. Performing review on untested code might be >> a waste of time. >> >> Please kindly resend and include all necessary To/Cc entries. >>
>> > > Sorry, I had run the scripts/get_maintainer.pl tool and got fewer > recipients than necessary.  I have redone everything in a clean > installation and now I have obtained more recipients. Please work on latest mainline tree, not some old clones. The cleanness of tree does not matter here. > > Any fixes I make in the patch I send to this same thread or should I > send it with git send-mail? I say this because perhaps I have done it > incorrectly and possibly created 3 versions, I apologize. My latest > version (v3) includes all the suggestions mentioned but due to my Not sure, maybe some, but not all. You still did not acknowledge the first feedback I repeated here and v3 makes the same mistake. > ignorance of the procedure I thought they should be sent to the list > again as before. Can I delete v2 and v3 and keep only the first version? You cannot delete things sent to people. That's why you should check things prior sending. Everything you send is archives and available for everyone, publicly. > >>> --- >>> .../devicetree/bindings/iio/light/bh1750.yaml | 20 +++- >>> drivers/iio/light/bh1750.c | 113 ++++++++++++------ >> >> ... and please go through your patch and see what happened there. >>> 2 files changed, 95 insertions(+), 38 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/iio/light/bh1750.yaml b/Documentation/devicetree/bindings/iio/light/bh1750.yaml >>> index 1a88b3c253d5..d53b221eb84b 100644 >>> --- a/Documentation/devicetree/bindings/iio/light/bh1750.yaml >>> +++ b/Documentation/devicetree/bindings/iio/light/bh1750.yaml >>> @@ -11,6 +11,9 @@ maintainers: >>> >>> description: | >>> Ambient light sensor with an i2c interface. >>> + >>> + Some BH1750 sensors require a hardware reset before being properly detected >>> + on the I2C bus. This can be done using the optional reset-gpios property. >>> >>> properties: >>> compatible: >>> @@ -23,6 +26,10 @@ properties: >>> >>> reg: >>> maxItems: 1 >>> + >>> + reset-gpios: >>> + description: GPIO connected to the sensor's reset line (active low) >>> + maxItems: 1 >>> >>> required: >>> - compatible >>> @@ -41,5 +48,16 @@ examples: >>> reg = <0x23>; >>> }; >>> }; >>> + - | >>> + i2c { >>> + #address-cells = <1>; >>> + #size-cells = <0>; >>> + >>> + light-sensor@23 { >>> + compatible = "rohm,bh1750"; >>> + reg = <0x23>; >>> + reset-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>; >>> + }; >>> + }; >>> >>> -... >>> +... >>> \ No newline at end of file >> You have unrelated changed all over the place. >> >> >> Best regards, >> Krzysztof > > Yes, in the patch I have prepared I have solved this problem, it only > adds the exact lines and does not modify anything else. OK, so this one is solved, what about all the rest? > Best regards, Krzysztof