Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3232800pxb; Sun, 20 Feb 2022 13:23:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDI11hcHRjmPLaQ24Oi5uJiTuE8juGyl4V7YX4djrysuf2pFv//AQuaXMLvVsFfWPn/dyy X-Received: by 2002:a17:90a:8591:b0:1b9:da10:2127 with SMTP id m17-20020a17090a859100b001b9da102127mr22427125pjn.13.1645392195051; Sun, 20 Feb 2022 13:23:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645392195; cv=none; d=google.com; s=arc-20160816; b=h7H7JkT51V3eH6GA1Iv0704uhyBla32ONtzMd68AgoiA6CGB19voR464dyJESz1zYt j/472P+oDQb7ambe3+5sMKeslzEsX+viLRFRJnE/ih7zFjw0NS6YQccz3/vZL1vW0Rui weeL1KM3psUcrrKIq2A0GcXNlP4vS5oTDdex4KQPPkcVNBf4jJrnqxl/Jr6hIG4gJjfT sr5rFnhMtOvck+i1szYQrLoXJLSXGJsd5ObziEOsgVlLzKGWSkxsdIt1P9AnbP54IG6R exeMs3q9ASKb1JGlvDEugYIsb/S5QdBqWuJiCen5FBZEa85XD5eKcjBSNifl7+Zf2jnW xn5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=VHaRDl/NeA/sk1ew9ZkQ6wgAVfjZxhVj9/cWGyaZpno=; b=yB4bseh2QURBGCBB0xuXbxzPJwfuklQQTDbdOgTzGlG0w/oWoeihHaRP1P5SBaUV54 Cw2AXp6G3/BrnX1YQNk22clDw/JUa4ncptoQ/yPufAl7x+4CQKWnI/+4rSEcXSXTYG/f KWWQXXqzJKooB+I7WP3KOHtTNgu/XSqWmPLjuxox0zAoIx+q2QLxDZceWnXugCcvvhp8 J4bKcsfba+EW/xhlsM/c4GZdjKNoy7OrXAhXgWSTwuaRDA75hErULRBaUmVZ3WHe0FMv RiYDkiQeYvAx9pfM4Ktd4FktPr9O1k6SFC921fMGlcNTGzUAeH9x8yiD/7gTePoH9KRm Mn6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DrbOGJXW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5si31006884plg.407.2022.02.20.13.22.59; Sun, 20 Feb 2022 13:23:15 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=DrbOGJXW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237572AbiBTD5c (ORCPT + 99 others); Sat, 19 Feb 2022 22:57:32 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238943AbiBTD51 (ORCPT ); Sat, 19 Feb 2022 22:57:27 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 672C341F93; Sat, 19 Feb 2022 19:57:07 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id 27so6092910pgk.10; Sat, 19 Feb 2022 19:57:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VHaRDl/NeA/sk1ew9ZkQ6wgAVfjZxhVj9/cWGyaZpno=; b=DrbOGJXWkMwEjYyrpb0z4riYVX2m3+wuBgJrfSafJ7eF7F8ZWrFVDFtuFb6Hl2NvK7 UimSfxfbtpRxJP7gw/nXDeYRf4yxnuGsHgfgoZtwBn86K2e5fngQR4rxZo1sBJCmwF8b fNtV7d8cZbKwyJJPt76XLEO2EXTe2LP+5cfKB2gbfcrcT10haXkpuWLTmIkODLfHQ4Y1 PoTidw5FUkydnwfeHtlQe1q7kWldSgyQbhEt4PgcC9HC2cHuaw0UW042eiI31qfJFzZT r31RIYEkiVI6gODot/NUcGb7reY8l5Oeg++LNtYX+7dHm0n8Uaw+PdV3z0AnCe9JIWs9 bl6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VHaRDl/NeA/sk1ew9ZkQ6wgAVfjZxhVj9/cWGyaZpno=; b=AWffW7ooB/GQswjWRZV8VE3T6t0xViWIbLXJpyih0WeQ4ajqwXwhI3yyH0uM9lfuQH fjuKeW3fljbmpCH1rQptIfahpdOP6ggw24GRZKTp6n+8EAoazgjtFQAAR9kDf9Z199Yu t64qmiDxlpgl1suNrchqGfc85ixu/eCqhXyOpStiJQyI58A30IfLmZxEoPxgw0MFRbGp /GKF822IVmVaWvhZ3uTjJs32A5c4npLq2WTwoGmRgtyUsuBqwOvMYuvad2AQjqg4FcDX 7O9iP8m6av9ocy43zLHBA/yzgsLOR18epcDpxsNbqwipN6hcKDjss+hAORXCgDwHhIHQ QjqQ== X-Gm-Message-State: AOAM531kLwJEo8beod0ZmvPcW7/341fwq+g0TgaUysAZmEPT4nxG7CXw ajt2GWUFotyiWTAPIupliQ== X-Received: by 2002:a63:4b07:0:b0:373:e921:ca4e with SMTP id y7-20020a634b07000000b00373e921ca4emr6478129pga.58.1645329426824; Sat, 19 Feb 2022 19:57:06 -0800 (PST) Received: from localhost ([2401:e180:8842:e799:9593:a6f2:788b:a48c]) by smtp.gmail.com with ESMTPSA id pf14sm3642564pjb.16.2022.02.19.19.57.06 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Feb 2022 19:57:06 -0800 (PST) From: Tyrone Ting To: avifishman70@gmail.com, tmaimon77@gmail.com, tali.perry1@gmail.com, venture@google.com, yuenn@google.com, benjaminfair@google.com, robh+dt@kernel.org, krzysztof.kozlowski@canonical.com, semen.protsenko@linaro.org, yangyicong@hisilicon.com, wsa@kernel.org, jie.deng@intel.com, sven@svenpeter.dev, bence98@sch.bme.hu, christophe.leroy@csgroup.eu, lukas.bulwahn@gmail.com, olof@lixom.net, arnd@arndb.de, digetx@gmail.com, andriy.shevchenko@linux.intel.com, warp5tw@gmail.com, tali.perry@nuvoton.com, Avi.Fishman@nuvoton.com, tomer.maimon@nuvoton.com, KWLIU@nuvoton.com, JJLIU0@nuvoton.com, kfting@nuvoton.com Cc: openbmc@lists.ozlabs.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 03/11] i2c: npcm: Fix client address calculation Date: Sun, 20 Feb 2022 11:53:13 +0800 Message-Id: <20220220035321.3870-4-warp5tw@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220220035321.3870-1-warp5tw@gmail.com> References: <20220220035321.3870-1-warp5tw@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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: Tali Perry Fix i2c client address by left-shifting 1 bit before applying it to the data register. Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: Tali Perry Signed-off-by: Tyrone Ting --- drivers/i2c/busses/i2c-npcm7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c index 2ad166355ec9..4c225e1a058f 100644 --- a/drivers/i2c/busses/i2c-npcm7xx.c +++ b/drivers/i2c/busses/i2c-npcm7xx.c @@ -2131,7 +2131,7 @@ static int npcm_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, } npcm_i2c_init_params(bus); - bus->dest_addr = slave_addr; + bus->dest_addr = slave_addr << 1; bus->msgs = msgs; bus->msgs_num = num; bus->cmd_err = 0; -- 2.17.1