Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp350421lqb; Thu, 29 Feb 2024 02:59:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVySJUG/0NgFKQVZulJkhhtIntf24fgS0xTVkRpnPg2WY3Uz/X/3lQeZWrwTFEI9oFwkxMq92YSpzi8BO9n1jV4CU+kK6LRfBF4nUBg8g== X-Google-Smtp-Source: AGHT+IFDcE4k6h3WTmcgqI4jVUTIYIkQH0flINTwmADvCj8hVzLTQVRT7cvasLnhqmIfD1dSWNXS X-Received: by 2002:a05:622a:5c9:b0:42e:7fd6:9dc2 with SMTP id d9-20020a05622a05c900b0042e7fd69dc2mr1875636qtb.63.1709204347416; Thu, 29 Feb 2024 02:59:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709204347; cv=pass; d=google.com; s=arc-20160816; b=dcS+CqtXY29mQjl1KNk4YEH6kWFTGRdeCjxtNpJLcy+3PBH/+J+8X7fkRYZ/GK7la1 r2iPUvmRvG+79sSESKP+rlnArjXyNoQ6qJ4pu6gPFAf4WtKWrQ2DOV/VFiE181B6KCxN 7s2xGAOQxOJAhoHRG6tLU1wsgljjGvumGOB83VbRCWlfl3KBP3s3YGiZVLsqyjqCt8vb 65inei4mfh6dPUUR337NmmrDEkzp2JHAeYLLgNXwQBf563rjbwC0ZYXzuPugy0UFr61f 9UUK5qRGlv409S11z+aV48xEYke2pojj/wzx9kFWZCoKyiprN+1hlMS3CNXD2s1J52/6 /VOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/y+V+1tDgCSb4ph0B2hx85t2I6GTJ/+BzAqonnhqTB8=; fh=VfhsHdI/Eb088J3tzGeWQ5NjURcM3nm+UYhlURhCooI=; b=pDshugB2yl5M60OT0yiV4i3qSG5keENGK2flRdRoatg076ghyoL9lIsOanqMzQlpsr +deY4lLuhhxbFNDtx9iPy1icW5SFzXVpFslhiSLqsHrrG4r2O02ul+PlD+9nrj1zTh8J vG+8bFjznaQIZFivqc7YYX6I1q4vW9iyilbJnqe0fTyadJkbCJfwO6QWTPsfAjgCOVw8 QUEhii2jSAtv4QtOs7cwVBxh9vE4TfBG68WDrE23+v8J7FvQ0EbScVPJ+P0H5qUjktuN C0DoGcf2vCCKSDk7bVn3i8K/jHV2fVhmbjGebuuHth0ksl5+2f+Pr44EPUi2zpNNJez9 Ynhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=YdJSz+rp; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-86595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86595-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c4-20020ac85a84000000b0042e7b41a92asi1124491qtc.622.2024.02.29.02.59.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 02:59:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=YdJSz+rp; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-86595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86595-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0B79C1C2245F for ; Thu, 29 Feb 2024 10:59:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8063C7AE76; Thu, 29 Feb 2024 10:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="YdJSz+rp" Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (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 603437A72A for ; Thu, 29 Feb 2024 10:58:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709204326; cv=none; b=lgSr/0euoQaRBnY/2nSMtp+CbFoQ01G7SfNFuIxdnMqykRZge9ehn7bcVWX0kQLCZc2gyWT6CsBQBL+dlVPAtz2+4DcwWYAXEDRajN9VnQO0sIHq9FYVxLOYj11TWcT/rSmUK9ccqquQkICdD8Purlli3kfaXHZN6DclzW3h518= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709204326; c=relaxed/simple; bh=4sd9fX38+0z52dugV8+bmNK8bTTLEY/RwiQhB+Ew+3o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K925ZWOH1GqNoupxcuyvPXGg0T9e2SqGvaAWDSAnUsXFKLlWPVtL7YTyFnGKNEAgTigVN79pUeA1OJh2yhlhd1XPdRA1zAw1usXPnqJLhXixDI1rTGryqgORGLWioHIcpPHJQsXLkWNx4vo4rIrZ4jSeTbCUFFturF+bXO9qcOw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=YdJSz+rp; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=/y+V+1tDgCSb4ph0B2hx85t2I6GTJ/+BzAqonnhqTB8=; b=YdJSz+ rpcAmXCgqbn1v1cUEbTTDDpOgjF7pnjkR8hkIsu5mNBTXNXUYRpf5s5wM9QK5L5D deKqAOGQj7PrasgO0ICEidD8sNay1Jg9vrUK8A6JinY2ztncHFzIJsM0PR98u8V1 Se0qT9pJyX8jYhxYRNaxLvHalG/guPXYlvLhLwxnXzhQjtRGXqIV/IDw0d35Zr5f F2s5sdfGw4n3kb+hY4XryMu2spb+G1uetsmT2ndWEALt/1mHxX7MM3vqSX1MGtYD 4kpIlhGX8CdXIx3fknrmoksOlKyAUe+6rszMxZ5s66MAgldFV0CuqMuNNvvy1yzo 8B+n54pmGeXUcowQ== Received: (qmail 2278070 invoked from network); 29 Feb 2024 11:58:42 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 29 Feb 2024 11:58:42 +0100 X-UD-Smtp-Session: l3s3148p1@8KB2JIMSfDttKPFZ From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Chris Packham , Rob Herring , Wolfram Sang , Andi Shyti , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RFT 2/3] i2c: mpc: use proper binding for transfer timeouts Date: Thu, 29 Feb 2024 11:58:12 +0100 Message-ID: <20240229105810.29220-7-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240229105810.29220-5-wsa+renesas@sang-engineering.com> References: <20240229105810.29220-5-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit "i2c-scl-clk-low-timeout-us" is wrongly used here because it describes maximum clock stretching not maximum transfer time. Additionally, it is deprecated because of issues. Move this driver to the correct binding. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-mpc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index e4e4995ab224..0b4de9e569ba 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c @@ -844,14 +844,14 @@ static int fsl_i2c_probe(struct platform_device *op) mpc_i2c_setup_8xxx(op->dev.of_node, i2c, clock); } - /* - * "fsl,timeout" has been marked as deprecated and, to maintain - * backward compatibility, we will only look for it if - * "i2c-scl-clk-low-timeout-us" is not present. - */ + /* Sadly, we have to support two deprecated bindings here */ result = of_property_read_u32(op->dev.of_node, - "i2c-scl-clk-low-timeout-us", + "i2c-transfer-timeout-us", &mpc_ops.timeout); + if (result == -EINVAL) + result = of_property_read_u32(op->dev.of_node, + "i2c-scl-clk-low-timeout-us", + &mpc_ops.timeout); if (result == -EINVAL) result = of_property_read_u32(op->dev.of_node, "fsl,timeout", &mpc_ops.timeout); -- 2.43.0