[RESEND,v2] leds: syscon: Support 'reg' in addition to 'offset' for register address
Message ID | 20231122230754.2844665-2-robh@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:6f03:b0:164:83eb:24d7 with SMTP id r3csp1561532rwn; Wed, 22 Nov 2023 15:11:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5M6dy0jBBOFEG2S8BK+aRM1u66l0g/nxngNeYdBXXKNaOBD83uphsDcMaEiJKjPTKVpKR X-Received: by 2002:a05:6a00:3915:b0:6c3:6cdc:a297 with SMTP id fh21-20020a056a00391500b006c36cdca297mr4003626pfb.14.1700694681943; Wed, 22 Nov 2023 15:11:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700694681; cv=none; d=google.com; s=arc-20160816; b=Hty6pphEDZm/JfPmLyJEWQEO/9aHka83w//EIHblgssvtE+vFNej6nE+6pF+hcOf/i RhPaR22Wo4dLBh1UIyFftxdFVmG4rmFNyH0tzQQPy14kmOb9maX0UdanHg75nwKoaxaY 8BM4lJ0CU4YCeQQdM/hw1i/boU8EDzHca77pTDrI6Ew/UWzdhua0sumPwZ06XYSR7o0m 3RH6P9Uld6TcKdxoXV2+CLCdkSeCJ/MwhiLcQrqYQH4+r9xajWrKNsabk9FV8dMm5sfm /VFF500VjO7e3UTM3icnN4PYGUgMoDoO2WSM8nQB4gVI5S6KA45oylyC2cu6JBpEAPVG Au+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=nObZTQG+vS/ySodGEz6Iv/w17ZhPrcgGwx4FOFJsZzw=; fh=KrNhU/Pcr4o3uwBcA4EwWFRa47aRhqWqqicBafR8bqQ=; b=G2RQlPp2PI5EdmpY191feIrQQf10NrATnfhB/Tdvur3dRQoMxaNWsHPCli6Rnu5tCL K+B+rW+LF7wuSTOYHeKSxWFT0ngQEMAA1W/2jhxeP7csdq75cYg9SONum9n/nyQdbG4R G6Dh8ZI/AxL9YBeBgKvt57SSzEOj7O57AISQHXijt73OCOQBI1RcyuxFyy4Tm97WDMs6 ESgdIE2+U26DY4r2dvvt6+up67iW7eIv/yXq9jvpVDl1sDpfRUZB4wLePtflYqo0Ax/s 6o6bABd5EhFJ7RVCieaVJoUtFTkK99IkpCEdArWWXUXs2KLNfuLa/PQYdPEEB6g0b5Xw nHCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id fc4-20020a056a002e0400b006cba60de063si48500pfb.22.2023.11.22.15.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 15:11:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7BB41834A779; Wed, 22 Nov 2023 15:10:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235182AbjKVXKr (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Wed, 22 Nov 2023 18:10:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232448AbjKVXKp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Nov 2023 18:10:45 -0500 Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D22ED67; Wed, 22 Nov 2023 15:10:29 -0800 (PST) Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-7b09035b850so9353439f.3; Wed, 22 Nov 2023 15:10:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700694628; x=1701299428; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nObZTQG+vS/ySodGEz6Iv/w17ZhPrcgGwx4FOFJsZzw=; b=XqRHBWuSXleIR7gQxiEQ2sGA9nH+WTUjyWit9qDN0AkDRP4Eaj+/zmJTNbMwCsEOL1 RWCrsU/7KwQ5yYOT8ww4V22uO6qkd4RZoNOwdILTzcfoIC4q9LwP+MWlH1EgeBMXOYGk kRXk5QNUAuXYUqU8j9lYhvZoIZVWYDxcwwnSqMZU7Jhdryg5oJ9dVOQcqas7EG/h3rNj y8YUeuRKo1crVBXTZwDy9UTOZyrPdeVNoNDcYjgyAzokK1MrCtikT7W5pINAH5KrOIJS MuxXM8sEEbQciBCygO2kuA0uKrXV/w0EE0H/orRC8udZrr9FdaRCLyZ+R57KX9qA7/Cz xJHg== X-Gm-Message-State: AOJu0YwM/3XoF8Uwi2tTXPd8kZ9/YpUDpbCRyUNuOI+Z7iZmkQm75rec GkjnRPDl+6X1c/K9Awsph/7G+KfmTw== X-Received: by 2002:a05:6602:4194:b0:7a9:571c:5694 with SMTP id bx20-20020a056602419400b007a9571c5694mr4404420iob.10.1700694628566; Wed, 22 Nov 2023 15:10:28 -0800 (PST) Received: from herring.priv ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id g14-20020a056638060e00b004664a5a22d2sm115195jar.83.2023.11.22.15.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 15:10:28 -0800 (PST) Received: (nullmailer pid 2847984 invoked by uid 1000); Wed, 22 Nov 2023 23:10:26 -0000 From: Rob Herring <robh@kernel.org> To: Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org> Cc: Linus Walleij <linus.walleij@linaro.org>, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH v2] leds: syscon: Support 'reg' in addition to 'offset' for register address Date: Wed, 22 Nov 2023 16:07:55 -0700 Message-ID: <20231122230754.2844665-2-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 22 Nov 2023 15:10:46 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783307626973845294 X-GMAIL-MSGID: 1783307626973845294 |
Series |
[RESEND,v2] leds: syscon: Support 'reg' in addition to 'offset' for register address
|
|
Commit Message
Rob Herring
Nov. 22, 2023, 11:07 p.m. UTC
The register-bit-led binding now also supports 'reg' in addition to 'offset' for the register address. Add support to the driver to get the address from 'reg'. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Rob Herring <robh@kernel.org> --- The binding change landed, but v2[1] was never applied. The last resend[2] may have missed kernel.org addresses. [1] https://lore.kernel.org/all/20210913192816.1225025-3-robh@kernel.org/ [2] https://lore.kernel.org/all/20231025190619.881090-2-robh@kernel.org/ drivers/leds/leds-syscon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Wed, 22 Nov 2023, Rob Herring wrote: > The register-bit-led binding now also supports 'reg' in addition to > 'offset' for the register address. Add support to the driver to get the > address from 'reg'. > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> > Signed-off-by: Rob Herring <robh@kernel.org> > --- > The binding change landed, but v2[1] was never applied. The last > resend[2] may have missed kernel.org addresses. > > [1] https://lore.kernel.org/all/20210913192816.1225025-3-robh@kernel.org/ > [2] https://lore.kernel.org/all/20231025190619.881090-2-robh@kernel.org/ > > drivers/leds/leds-syscon.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Looks like I just applied the last one. I'm assuming no additional changes, but please let me know if that's not the case.
diff --git a/drivers/leds/leds-syscon.c b/drivers/leds/leds-syscon.c index 360a376fa738..d633ad519d0c 100644 --- a/drivers/leds/leds-syscon.c +++ b/drivers/leds/leds-syscon.c @@ -81,7 +81,8 @@ static int syscon_led_probe(struct platform_device *pdev) sled->map = map; - if (of_property_read_u32(np, "offset", &sled->offset)) + if (of_property_read_u32(np, "reg", &sled->offset) && + of_property_read_u32(np, "offset", &sled->offset)) return -EINVAL; if (of_property_read_u32(np, "mask", &sled->mask)) return -EINVAL;