Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp252395rdd; Wed, 22 Nov 2023 15:11:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IE10eiRLh39OmpahxMSSJGyK6sHdOE5mRdijhhDjw0FeQq4y+UmAquiP7fr9hI5/yHIlkjg X-Received: by 2002:a17:90b:1e12:b0:285:64b8:e2fb with SMTP id pg18-20020a17090b1e1200b0028564b8e2fbmr43883pjb.28.1700694663018; Wed, 22 Nov 2023 15:11:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700694662; cv=none; d=google.com; s=arc-20160816; b=vcnKWjRCNOHhd9dUJocduMfjMtbTZMBNg4Ec/F2/LOToMRWDuJQd7jrC5iUjDV2tF6 bm2Y4BcmSgrnJ+ssiS+5wlpTldC5Mm5xwCZ5dHF73D5MbfqJ4DstfWWW/BySiJRIYr/I wo1QgUsm1gWm64CRiwPoSajeinGOnFxsMgB2HlWI+Uc9x7PnNyI01d9V0aA0GtO/JZ2c 4rwf8Dqgxop+KVYV/wuZW7OCwQHez8PJNuWwwfFUH+lfPRlqsI45cgt7kRsYCRej3rsX p8gVHPB6K2BqM0h0HSQ6dk6Y9aOhiVknm23qpZeoySCQULluxowhuy2k7lMo9euwj9+8 hT5g== 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 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id t5-20020a17090aae0500b002856405ad68si114070pjq.34.2023.11.22.15.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 15:11:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 0971D8087B41; Wed, 22 Nov 2023 15:10:59 -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 + 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 ); 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 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, 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: 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:59 -0800 (PST) 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 Signed-off-by: Rob Herring --- 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(-) 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