Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2783808rda; Wed, 25 Oct 2023 12:09:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEY8A+uWrrTRwxtxxrP2glu5g+ilKBsmD7DYx6EPITLNBkuPMG1wBu1Cxl13PC3bgBaxQrg X-Received: by 2002:a25:f02:0:b0:d9c:a3b8:f044 with SMTP id 2-20020a250f02000000b00d9ca3b8f044mr16411592ybp.27.1698260962595; Wed, 25 Oct 2023 12:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698260962; cv=none; d=google.com; s=arc-20160816; b=gGKxvjn1yKPsZwlPyr9cq+5XG0PpoINLcyOTnzqeh2izFCXZTSwVh4IQZ5KHAwbEAk 7W2W6FNaGd9ANoNijrlsOPNf3QwUyA57gxzgoZ/+nAvaE+tYXOrdh5IVNNmn5Bm1OelD 5U1Hfb2zYoYDohR7Xkp5g3xFEYyTHHKuN1ZZYCY0p03mzmXm9tLKh9B1DEpd4z6IsGWl gn1e3zdEGxBUvH+7i6ut6HU0P1Ebn7jdnN2e6jqg704nBgTOSN/HexUHwFX9G/OUjA+B G4roq9w4YNoYhLwLshhhgxTsVXglpmC8KeArVWX8pSYyYQod+ZtolyHHZAKgpUdrYztI /8EA== 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=diZnW8kdNsKvHujvt7WxRnsVerr3Lfx5/qdqU5i3RQM=; fh=KrNhU/Pcr4o3uwBcA4EwWFRa47aRhqWqqicBafR8bqQ=; b=sIMUKjVWMlADRoObnjuVWB2BfKmTpqsSDxTd/S7UoVoP1wFmwT7SRNyw6Cm9h8uPph YYNmtKUnUjNxqHDErm5dVCVprKuLXU+9Yp+tjySw2pxwRNXcn9WNas4Ua1UNE+VLVD3+ Vz7xP07E5nSX8p6+J0+nlPxMH+Y/KoLMn3u3Zn8qmZvMyaB2DSzEq60CmbF+wrbwzNWA btEDj8e+jLfIkYJP5B34jaLjxkuqllh5hhwakPGTF7qKOOxCUNrnqL6sumKQXN2nCJgS 1xUGNTOZZRF/S0yZVvwYywP3jrQv8GjdTIcCG20N67kC/8Mp/ESew6wemXT4z41QIkMr +I8g== 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:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id h14-20020a25d00e000000b00d9cb86ddc0dsi12202513ybg.414.2023.10.25.12.09.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 12:09:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id CAF668145551; Wed, 25 Oct 2023 12:09:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbjJYTJK (ORCPT + 99 others); Wed, 25 Oct 2023 15:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbjJYTJJ (ORCPT ); Wed, 25 Oct 2023 15:09:09 -0400 Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68507BB; Wed, 25 Oct 2023 12:09:04 -0700 (PDT) Received: by mail-oi1-f170.google.com with SMTP id 5614622812f47-3b2e22a4004so20526b6e.3; Wed, 25 Oct 2023 12:09:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698260943; x=1698865743; 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=diZnW8kdNsKvHujvt7WxRnsVerr3Lfx5/qdqU5i3RQM=; b=s7LyCyCsTKA6RpIz3Ms21tR3u8UAmJ2afX+8t+Uc0HPwbgI6lSB92wWNkUp+7py6Gy zo3jMb3Ev1x5WD6WrX06fl1+f4iGKBLKfXt4woQ/SsRlNkRZSvYcEbge8K2OyZD3Nb0E NoiYtVC8i4rJ8WJD+w8U1pCByC8z+aIaQZVNIhNHMPKwHzfUFj8S55fBtDtmKDK8xrGD FqyrXGW6xPtdnyX4quwoRfnmluGCO9G6u6BrjS6FkCDlP7XxKnVCqg5jVijelkYzJKh5 w9veDbRqrJu5FeNL/sKgo0RM6DDjs32Cy4O64sV0dcTGzIlmD+OTmxRiI93IDdzPIPnu KVuQ== X-Gm-Message-State: AOJu0YxERgshNZWrCHku6URz/t0MJqbZUuv1ou/WLze7XUxJb8mODAc4 eWVazPG4MZP33jtBWtfIfg== X-Received: by 2002:aca:220e:0:b0:3ae:5e0e:1669 with SMTP id b14-20020aca220e000000b003ae5e0e1669mr17480795oic.42.1698260943637; Wed, 25 Oct 2023 12:09:03 -0700 (PDT) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id k5-20020a0568080e8500b003afe5617691sm2457409oil.12.2023.10.25.12.09.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 12:09:03 -0700 (PDT) Received: (nullmailer pid 904131 invoked by uid 1000); Wed, 25 Oct 2023 19:09:02 -0000 From: Rob Herring To: Pavel Machek , Lee Jones Cc: Linus Walleij , 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, 25 Oct 2023 14:06:19 -0500 Message-ID: <20231025190619.881090-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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 25 Oct 2023 12:09:20 -0700 (PDT) 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'. Cc: Linus Walleij Cc: Pavel Machek Cc: linux-leds@vger.kernel.org Signed-off-by: Rob Herring --- The binding change landed, but v2[1] was never applied. [1] https://lore.kernel.org/all/20210913192816.1225025-3-robh@kernel.org/ drivers/leds/leds-syscon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.42.0