Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp682966pxm; Thu, 3 Mar 2022 02:27:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3JIZKqHOKZwuA2NYWN795wjpcSo262J+cYfGuFuGGERIXoVbg5pBAA5BFVrzOhhxyT1pm X-Received: by 2002:a17:906:1be1:b0:6ce:b0a8:17d with SMTP id t1-20020a1709061be100b006ceb0a8017dmr25794950ejg.413.1646303245748; Thu, 03 Mar 2022 02:27:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646303245; cv=none; d=google.com; s=arc-20160816; b=Rs+o0kpD7HAVk9LJIx6Y6nvI0k5BE2noDLyXTPz9Rm13VvrIb6KUSccqTsQ5Vypw2Z zmqtydSPENCKIPKUl/pBu8ggCs7j1KVmCQTQuIqJYBa1tdJkfgs3jZ2xN5I1OIuMog+q 0zgPxXUC95yebYezh+JCu5p6CyvzvpGQNOl+zpLs6zB6lLg5y6OtPOz9O85H2pzakjgo yuNbdftKWYYmyX7BSeQywcp/QulBtzh5esZbtvCF/iHDoAajrelqq0Ba2FmHGugpFE32 LZ4sAB/kksf3CiALWglELleCAe5UyG/qoFOtZBEOozwBZMcRgZyUyhZ9rur3qqSjCz1Z 8cpQ== 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=XEGSZdKTGjQUiebnJ7Cj+xa8OKXjyHuKcAfwI6ZFOSdPnqKTyWbJ4YyUBjYuGwuoTR bbDkU4KiJASn506qa2dq/Fk+GY7uUogHDFbOPkql0s/T40SNVR1juhQ0u801/BE37acf MPjtgNy2dxNI8jb96rLTratuTSLJVkjxBuBC8LCU7kBe5Wof5GQ71yB/caYvo8b1uLo3 F+duGelicBwXk9O5VMGfRihiUkTY5dWnXksOh3b+ncSFJHqnWwP2m0rjfWCBvKJvCCMW sBrz0Yi7hOFCkm5AXm3qXuYsT5GPcBy6OiFH48WNkGKYoht9Bsh6cmJWwmdAKg40Z0G9 NM4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AJBqM8KI; 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 cf10-20020a0564020b8a00b00410d2bb6658si1013881edb.42.2022.03.03.02.27.02; Thu, 03 Mar 2022 02:27:25 -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=AJBqM8KI; 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 S231438AbiCCIct (ORCPT + 99 others); Thu, 3 Mar 2022 03:32:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231433AbiCCIcl (ORCPT ); Thu, 3 Mar 2022 03:32:41 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33A7417225F; Thu, 3 Mar 2022 00:31:55 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id ay5so3903742plb.1; Thu, 03 Mar 2022 00:31:55 -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=AJBqM8KINeoSRfWd9e1yx+VHrQVOEYrRFBl3cJiRuwIUKEbKVendgOQ7Xy46sdKU3k glEwJj3KfpKi4Qm2qhlqxhpUjd5S5v/Dy1R3NBpp3YS0QBY6+cuKJcFcMgZaRQSkhs+B 1fONo7ec+hBHBOMcreST8AMQeepSlkLBe5XAgpIGa62HQECMIDO8gzkwiDvDmlUGNOUU QZND0Vv/NyOhr/Rq3dQObQ0poDmRxzIXO+xzOyr4Mk0NS8QLXeCwhm+dZIcXgq8PJnLh kccjPPScsJCao6pDfscVLkAg2Mgk+b0VmqdnPVdO5vqApQrDdvuC0Yc+dvcs9zp2Ff6D 8IIg== 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=ekXjHIzr2Of//1Lc8rBKVzVGZFX3qH6Q9Uo8x/YAB4DwYg7i9uyECjSJdwcxX3NSQx UzlYczeKE3A6o92W9RrtH7achWrFgBojKnI/HxTV5b26afXQBPc6aLnpeDvhAYSweMSL ZMjdHKjgdd+k38cCjebeyIg8+Ei8nIFzLWgn9Vaiz+tArnYf1hKGJnE3hfLI6Cv5TAFt lgl94ztdN5Mlcwpm+QINSNw2niIelEpVKDzci9ZJA89RT+4FgbSJPPVPRVfV3z4CiptO VZgQnDnRaMBtc7weYQFg/PUMDcxR3OOlu+Qj7w6DCR1VXJ4xIDKL5tiKkh84FIbmNCDy QERA== X-Gm-Message-State: AOAM533XRy6HDeYhJac0oej3uoZuTy87LEEQ2+v9wyBxqLXwoem2kN77 a9VUrZLX5WHdoV/AmMpK8g== X-Received: by 2002:a17:902:d643:b0:151:6f2c:cfb4 with SMTP id y3-20020a170902d64300b001516f2ccfb4mr17463091plh.120.1646296314590; Thu, 03 Mar 2022 00:31:54 -0800 (PST) Received: from localhost ([2401:e180:8860:3b30:e4a0:392a:996e:c525]) by smtp.gmail.com with ESMTPSA id ng11-20020a17090b1a8b00b001beefe9a1cbsm1488852pjb.31.2022.03.03.00.31.53 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Mar 2022 00:31:54 -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, yangyicong@hisilicon.com, semen.protsenko@linaro.org, wsa@kernel.org, jie.deng@intel.com, sven@svenpeter.dev, bence98@sch.bme.hu, lukas.bulwahn@gmail.com, arnd@arndb.de, olof@lixom.net, 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 v3 03/11] i2c: npcm: Fix client address calculation Date: Thu, 3 Mar 2022 16:31:33 +0800 Message-Id: <20220303083141.8742-4-warp5tw@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220303083141.8742-1-warp5tw@gmail.com> References: <20220303083141.8742-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