Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp956594rwe; Wed, 24 Aug 2022 12:02:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR7YF8g3Ackc20qlf4ASJ5nFFZm9HiGMbNF2i+urRdOYlyTSEceegkwxzyr4f4mMDimze5+7 X-Received: by 2002:a05:6a00:21c2:b0:52b:ff44:666a with SMTP id t2-20020a056a0021c200b0052bff44666amr548588pfj.83.1661367727735; Wed, 24 Aug 2022 12:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661367727; cv=none; d=google.com; s=arc-20160816; b=E+t2VNzc4b1jD1RDtxcewePKvS7KIT5au8pa450rwUwCKA2eB8pGL1xm7VvfpRmTzp l/fB+AzxDbIAkhgnRNMilNw2Sj/IAJdpblNze3g47Sb/N0TrWv9tHM/s+7yMtycS+WpY SBXPFul70RPGMmSSTkfhHU5DtH8dLtaOgLbC2O6jJvVJd9zr90obYEKJWMETWHBDXULb frB3GspGBgg7m8R6vilekbhLMUYe1Dlyxbb11pMzBMgzORvMjvT7XvAam1mbRexDy1Ae B7WCng4YmFXf5GBqD8agu/vuxGCAdKhJorjO0M5fS/EQ8ImesTVH0k8B+xsS1Quf+jdA OdMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=dPOGfBT54RWRtu5CeO5LKRCTkkIsVZr0LQex7RYeaCk=; b=iwWTVz3VFuCkquVVGmeuQXw/8XBqsduS3e44Eto6CXVNU5B4IbWi6Fp7H7eFQxn6iH jVTizeGkraf14QxXMr3WCQgpCvmxp6HI7/OqeNZIkfEK7PQPZtFpgCd9af6VIgAWEjML dFRUHJnGCTsEkPjPrzNfqLd4ZxzazIlh8mG4yErBILxgF1+7isNlSnQXMsEuzWCir6fY Cy0O5k5Y2l2kjPdJKuRMU4HJ5V7JDcbhw4AJrCosa5IdGNUTWBS3tRI92bcOQNWMWazS JAFBtJpt1On78DIvGVdOk92ey9NF1ocBJL26nPga7SjAUR2Wq86b1XbOBmXWwlrp8z0M VeJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ILqCftLP; 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 t8-20020a17090a4e4800b001fb47ec7b5bsi1682849pjl.165.2022.08.24.12.01.52; Wed, 24 Aug 2022 12:02:07 -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=@gmail.com header.s=20210112 header.b=ILqCftLP; 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 S238310AbiHXScR (ORCPT + 99 others); Wed, 24 Aug 2022 14:32:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231224AbiHXScP (ORCPT ); Wed, 24 Aug 2022 14:32:15 -0400 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE76665245; Wed, 24 Aug 2022 11:32:13 -0700 (PDT) Received: by mail-qv1-xf34.google.com with SMTP id m5so10700528qvo.4; Wed, 24 Aug 2022 11:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=dPOGfBT54RWRtu5CeO5LKRCTkkIsVZr0LQex7RYeaCk=; b=ILqCftLPvIZmDnkp/ng1MWr95opHLoBnWEdaG37b0jq+/4XJ8nkHwJfKHIBNc/mLfb XId+RCpY3rKHVL90QTPRUGcaKd4TQ03KcK1TMQHJYP13OPPVTGmrCpvY0pjk6QaKlSNo NZsw9R2QRAT1tbArRKehY3+IPyCHJRXq+mJOgxBvwa8D5URyTz68P8hJhCxHDFoeOscb i9YvUViz18LEy2dVw1EYEPfee+E5twLiMclRSdoAoK6IoIAvyM98R/KtCgo+EEgErX2k zAHryZF6EDLo7J57NPKmPBXKzQtofuvzeJyXj7q3+GuuklMVIUcKDp2Q7O7MWcTMt0a+ H0AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=dPOGfBT54RWRtu5CeO5LKRCTkkIsVZr0LQex7RYeaCk=; b=THgDNCaYj/jp/BpP9Xd0NLmtXMM7TVqIJ0z0FWA5q8EiULq6A0wMrqDwcKxn6au/Nq joe2C0b2nacY6AsphiddqjFg81v4M/jo9VwgW0Q6w95yfcJvArGADZKXqRQgIPLwFAC7 3+IVxPGD6GMSbTUUhxqKBkN0twTSR3CSfwwOBESVURkoP7eP1UbUmZ22xoDH0gp6PqM5 JlRI7bvbY5+IadhmqWq3NK4vxjFM0er1ML7WT6OPTmtflXRDSYSSONcxSl2G4B3/M8lK j1ZeYXyON9QlZz7cEEY04GogamKxmvgn932jwp+lEttazJU+LD4WXc3AW7B4sqPDNcts kebA== X-Gm-Message-State: ACgBeo3P1YvlDZAojQeEdjemRpEVof06dXkw8G4F4/3n0bGgEGmwfkZ/ zB3nYqwv0d2VyMNA9ebIz5EW1qeX+ZqwslAU4mI= X-Received: by 2002:ad4:5baf:0:b0:476:6a9e:b5e1 with SMTP id 15-20020ad45baf000000b004766a9eb5e1mr373770qvq.64.1661365932922; Wed, 24 Aug 2022 11:32:12 -0700 (PDT) MIME-Version: 1.0 References: <20220823145603.2606475-1-tharunkumar.pasumarthi@microchip.com> <80debd4bbf819cbfa16681172919436df476558a.camel@microchip.com> In-Reply-To: <80debd4bbf819cbfa16681172919436df476558a.camel@microchip.com> From: Andy Shevchenko Date: Wed, 24 Aug 2022 21:31:37 +0300 Message-ID: Subject: Re: [PATCH RFC i2c-master] i2c: microchip: pci1xxxx: Add driver for I2C host controller in multifunction endpoint of pci1xxxx switch To: Tharunkumar.Pasumarthi@microchip.com Cc: Andy Shevchenko , Microchip Linux Driver Support , Wolfram Sang , Krzysztof Kozlowski , Sven Peter , Rob Herring , Sam Protsenko , Linux Kernel Mailing List , Jarkko Nikula , Olof Johansson , linux-i2c , Jan Dabros , Arnd Bergmann , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, URIBL_BLOCKED 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 On Wed, Aug 24, 2022 at 6:04 PM wrot= e: > On Tue, 2022-08-23 at 18:05 +0300, Andy Shevchenko wrote: > > On Tue, Aug 23, 2022 at 08:26:03PM +0530, Tharun Kumar P wrote: ... > > > + * Author: Tharun Kumar P > > > + * Kumaravel Thiagarajan > > > > Single or many? > > There are 2 authors for this file Do you see the issue now? ... > > > +#define SMB_CORE_CTRL_ESO 0x40 > > > +#define SMB_CORE_CTRL_FW_ACK 0x10 > > > > Are they bits or numbers? > > These are bits Use BIT() then. Ditto for the rest of the bits. ... > > > +#define SMB_IDLE_SCALING_100KHZ 0x03E803C9 > > > +#define SMB_IDLE_SCALING_400KHZ 0x01F4009D > > > +#define SMB_IDLE_SCALING_1000KHZ 0x01F4009D > > > > Shouldn't these magics be decimals? This Q seems unanswered. > > Ditto for the rest similar stuff. > > There is no direct correlation between the hex value and time. Configurin= g > registers with these values in driver will set the time in device. ... > > > +#define I2C_DIR_WRITE 0 > > > +#define I2C_DIR_READ 1 https://elixir.bootlin.com/linux/v6.0-rc2/source/include/uapi/linux/i2c.h#L= 24 > > Namespace collision. Doesn't I=C2=B2C core provide these? > > I am unable to find any existing MACROs for WRITE and READ in I2C core. K= indly > let me know the MACROs ... > > > +#define PCI1XXXX_I2C_TIMEOUT 1000 > > > > Units? Same to the rest similar cases. > > Unit is milliseconds So you know what to do, right? ... > > > +#define SMBUS_PERI_LOCK BIT(3) > > > > BIT() out of a sudden. See above. > > Will use hex value for this like in other places to maintain uniformity See above. ... > > > + pci1xxxx_i2c_shutdown(i2c); > > > > Do you really need this in ->remove()? I would expect something in > > the ->suspend() / ->shutdown(). > > pci1xxxx_i2c_shutdown API will reset the registers that are set as part o= f > pci1xxxx_i2c_init. So, this API is present in ->remove() and not in ->sus= pend() > callback I understand that, but it doesn't really answer my question. --=20 With Best Regards, Andy Shevchenko