Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4490104rwb; Tue, 6 Sep 2022 08:13:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR4QYvLZkmmlQbbsjcwWP966WFeyR1FYde7JGVtFw4WDvdOStoX93cyP/HV4hlmGLkdRfCOr X-Received: by 2002:a17:907:270c:b0:76f:afae:2705 with SMTP id w12-20020a170907270c00b0076fafae2705mr1431688ejk.463.1662477189118; Tue, 06 Sep 2022 08:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662477189; cv=none; d=google.com; s=arc-20160816; b=hOtMjvb6XQ5W2aPNzkavVNttg4u7topsc6A4GI+hxdQ8BWUwp4BeW071c7WjYpaZlj ZU1Al3D9cyPCUZ8DX2f8uj87gXa9o78uLOhXptAHkT38dBr82zsr8bzt8PgZ0NqOmP57 A0LSDeMsBkO5645Z6Q/8KF6lzcnMPm60DWByuqMjmEGrSMXyfMlbuFDPrb4rfvJr0dDj Re+dKHBWQ9hx2g14k9TZ6ufyDvzWReXeGPKoJR8r7FwAvMhabzMMWMcZBC8tDd2kc5Qz boc8YsNrO2Rcz6ckhNrTkpbwmHZMGBiI48pRUYK+vNBCBAOwYoFklwc5KFb7YhtPLWPu SJWw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bEPWkruba+0fAI7aisuROAjMFgcwko4sKMKsu0C3k78=; b=03+n9JZOeVdMrfk2cMwuM8flLhW1VWfUmBcNXH8E6XQ0NwpdFn7r/yw4Lp2j2xKdKh s9fNEf3Mxy9bI02xaYV739xFgUoD0imIcrnBowbQgHqx1TBNe+jjVFJIfUjUMCTWuSWc Q7dQj1D0KHEZQHJGnuhsW24qgP/Uag8AyIE5tUOfLfAeFUFf7HtzZRO2LQxr2KGanoJy VpgHUmdkfFP/FXbczlxh3x7JmtXr2ADcV0OxzBFlwtG5Az/IKtS1Pkz/SpM+vTh4S2m4 tyCJmNdZ8R1Y3pRrjroK2IDlbRF299ssdxrNmcJIlar8Bhdr54SDjg3KmNdZpntlETzq FogA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IDia24vn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf17-20020a1709077f1100b0072ed60fb78asi9607091ejc.548.2022.09.06.08.12.44; Tue, 06 Sep 2022 08:13:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IDia24vn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241384AbiIFOMk (ORCPT + 99 others); Tue, 6 Sep 2022 10:12:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241612AbiIFOKW (ORCPT ); Tue, 6 Sep 2022 10:10:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7218E86FF5; Tue, 6 Sep 2022 06:47:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9A6C8B818E0; Tue, 6 Sep 2022 13:46:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06EAFC433D6; Tue, 6 Sep 2022 13:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662471965; bh=ovvOVOt9r+5itWzJLQAvGa3PmonSJtv2U078KyGl1yA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IDia24vna82iNufqYJZSNtj3qfg3H5v5LMRvaHZn/+7mrxCH4KOArzAcowO1h/c5i Zrmx4dpCE9RKq7KJ7earJcjVQqJK23awP+R1/0QCEUvrg0cxZ5OoiOnkk8nMW/WEN2 WK4W7lhqMQWGWOPub3rSipyEWpk+XJ6C3zkdiS3I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marcus Folkesson , Andy Shevchenko , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 5.19 070/155] iio: adc: mcp3911: correct "microchip,device-addr" property Date: Tue, 6 Sep 2022 15:30:18 +0200 Message-Id: <20220906132832.393762004@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132829.417117002@linuxfoundation.org> References: <20220906132829.417117002@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marcus Folkesson commit cfbd76d5c9c449739bb74288d982bccf9ff822f4 upstream. Go for the right property name that is documented in the bindings. Fixes: 3a89b289df5d ("iio: adc: add support for mcp3911") Signed-off-by: Marcus Folkesson Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220722130726.7627-3-marcus.folkesson@gmail.com Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/mcp3911.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/drivers/iio/adc/mcp3911.c +++ b/drivers/iio/adc/mcp3911.c @@ -210,7 +210,14 @@ static int mcp3911_config(struct mcp3911 u32 configreg; int ret; - device_property_read_u32(dev, "device-addr", &adc->dev_addr); + ret = device_property_read_u32(dev, "microchip,device-addr", &adc->dev_addr); + + /* + * Fallback to "device-addr" due to historical mismatch between + * dt-bindings and implementation + */ + if (ret) + device_property_read_u32(dev, "device-addr", &adc->dev_addr); if (adc->dev_addr > 3) { dev_err(&adc->spi->dev, "invalid device address (%i). Must be in range 0-3.\n",