Received: by 10.213.65.68 with SMTP id h4csp547925imn; Sat, 17 Mar 2018 14:08:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELsGK8CWvXs6aQEjIVXYjq+XWhtnI/nTAE8LfNcE/xnrdZ8O9FjfzRgaLSaOf7LOtiS9n7Y9 X-Received: by 2002:a17:902:b907:: with SMTP id bf7-v6mr4981893plb.325.1521320932844; Sat, 17 Mar 2018 14:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521320932; cv=none; d=google.com; s=arc-20160816; b=Uys0a+UNyMwBkR50+ywvrVPcZUqL2zIyIxn1AdzqDrolwl3qG4CE37ZyrpoIPUdqG4 pakoGjBdYGQyuGW8f5DtjaMbGqe98ew7kkEpoFkBIedW1dTirZCzLJIzSp+U+3z15f21 mH025lnEFK7KPTq4FigFSGq8D2LZvlkCOdYzoHa79hAONhr1MsMsX5jvtdsVuM1enFdr 7ufF+6KHIrRtfKs9baDN5e2+pkmM8JytSQ2fO7LNCDg9gEZDhlvP6g7dNEEUnbHpWSOD 8DdonS0zRYcEQevPJjfWlv9yCyjJl2i75MyS4EbAJePuqeo5QaqHXuYhVdm07gqxjFKr WVTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=lY1xAu8RLKPQakjATGboHG1nbYyXh9GtIPDm+bM9ihg=; b=VK113WF9IkSoDEuk7o+CI26Rzu0mBpXZJSi9X1SYyNmlkU9iPk0yAXLxE1rQJEaL1M XiBbvv7wKMFi+jBJzzGskBJjBDrLZrcJzhe28f2+t7dA0esZOx5ZpvofUnAhrnOLGM15 1k8d2w+f3FJczn/Azy1gh/wNH1Zgv3xdjBCFU7nlWsfo25RO59wC9ub9hFjfOhaY/Luw wzUyyLI7+p/euOWuMXNnv2Ry7GDxuK5bhKHNOXqR+TIjXUsaL3iMgs382CDsqSVuGcGu lVvEsKD3FkmvO9MgV3Cuas4dXM1fLVu+1rmsNDUamErdeQxLuqcvQN//LI+MUwaQw2vc rTEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j88si7846174pfe.324.2018.03.17.14.08.37; Sat, 17 Mar 2018 14:08:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753356AbeCQVDE (ORCPT + 99 others); Sat, 17 Mar 2018 17:03:04 -0400 Received: from sauhun.de ([88.99.104.3]:38762 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751236AbeCQVDD (ORCPT ); Sat, 17 Mar 2018 17:03:03 -0400 Received: from localhost (x4e30d9f4.dyn.telefonica.de [78.48.217.244]) by pokefinder.org (Postfix) with ESMTPSA id 4477E2C6DAA; Sat, 17 Mar 2018 22:03:01 +0100 (CET) Date: Sat, 17 Mar 2018 22:03:00 +0100 From: Wolfram Sang To: George Cherian Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Kamlakant Patel Subject: Re: [PATCH v2] i2c: xlp9xx: Add support for SMBAlert Message-ID: <20180317210300.yyft3errf3opj2t3@ninjato> References: <1520347594-184146-1-git-send-email-george.cherian@cavium.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gqocpd2od3bxsp7n" Content-Disposition: inline In-Reply-To: <1520347594-184146-1-git-send-email-george.cherian@cavium.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gqocpd2od3bxsp7n Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 06, 2018 at 06:46:34AM -0800, George Cherian wrote: > Add support for SMBus alert mechanism to i2c-xlp9xx driver. > The second interrupt is parsed to use for SMBus alert. > The first interrupt is the i2c controller main interrupt. >=20 > Signed-off-by: Kamlakant Patel > Signed-off-by: George Cherian Are the previous reviewers happy now? > --- > drivers/i2c/busses/i2c-xlp9xx.c | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) >=20 > diff --git a/drivers/i2c/busses/i2c-xlp9xx.c b/drivers/i2c/busses/i2c-xlp= 9xx.c > index eb8913e..d5cadb6 100644 > --- a/drivers/i2c/busses/i2c-xlp9xx.c > +++ b/drivers/i2c/busses/i2c-xlp9xx.c > @@ -10,6 +10,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -84,6 +85,8 @@ struct xlp9xx_i2c_dev { > struct device *dev; > struct i2c_adapter adapter; > struct completion msg_complete; > + struct i2c_smbus_alert_setup alert_data; > + struct i2c_client *ara; > int irq; > bool msg_read; > bool len_recv; > @@ -447,6 +450,19 @@ static int xlp9xx_i2c_get_frequency(struct platform_= device *pdev, > return 0; > } > =20 > +static int xlp9xx_i2c_smbus_setup(struct xlp9xx_i2c_dev *priv, > + struct platform_device *pdev) > +{ > + if (!priv->alert_data.irq) > + return -EINVAL; > + > + priv->ara =3D i2c_setup_smbus_alert(&priv->adapter, &priv->alert_data); > + if (!priv->ara) > + return -ENODEV; > + > + return 0; > +} > + > static int xlp9xx_i2c_probe(struct platform_device *pdev) > { > struct xlp9xx_i2c_dev *priv; > @@ -467,6 +483,10 @@ static int xlp9xx_i2c_probe(struct platform_device *= pdev) > dev_err(&pdev->dev, "invalid irq!\n"); > return priv->irq; > } > + /* SMBAlert irq */ > + priv->alert_data.irq =3D platform_get_irq(pdev, 1); > + if (priv->alert_data.irq <=3D 0) '< 0' should do, or? > + priv->alert_data.irq =3D 0; > =20 > xlp9xx_i2c_get_frequency(pdev, priv); > xlp9xx_i2c_init(priv); > @@ -493,6 +513,10 @@ static int xlp9xx_i2c_probe(struct platform_device *= pdev) > if (err) > return err; > =20 > + err =3D xlp9xx_i2c_smbus_setup(priv, pdev); > + if (err) > + dev_info(&pdev->dev, "No active SMBus alert %d\n", err); > + Do you really want to print this info every time SMBus alert is not used? Is it common on this platform > platform_set_drvdata(pdev, priv); > dev_dbg(&pdev->dev, "I2C bus:%d added\n", priv->adapter.nr); > =20 > --=20 > 1.8.3.1 >=20 --gqocpd2od3bxsp7n Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlqtgoMACgkQFA3kzBSg KbY67A/+NMz9SSfbt6tHhA8S37QIb3QRg0JNE/zcBhcJ4pKb8GaFDbCpvDSV33WR +9lXFJCKndoALgPUTh0wkR2cNKecX8FKNo81CROzquzhZ8EizcqEHNK5Wnixci+7 BDSY4fks5FN51Lly85o37PJWgHRRJZ9ZL+Bv9Jh3oFWgjXH83dZONyHqgxK2XoP1 ARnTvuho/gWnv/VSWNx40mOXv53WxLSG4Xe4yZRLg5mG7h2YPFldIZk/ppfuGWdK ldLnRU943jOPp8Q036tBM4msT+Pa/0uXQcGz5Th/ALHDbDatvIhvaBavYF9TXOaR QQiupJN+KjZ9d3EYHYSWUfMWq3jngsA6gEPF1EShDApEskqsOklitnkUTYhwmGMC hUkqYJS6xNcmWr9fBt90MK5/rK3ALPVnxL1D6BfJxXyGR8+t+5YTj09L/KzR25Tn M3z+dSGOFZDNY/2fplAEsVpr5ynNOeD97m7Q441xjVgpSMadiz0VmYfUXszwX8JJ VPQZDaeLWfgWhbZ1BIdz2qOzJ57STmgkoRQCDZw/7G7kfRr2fgI103NWK756B5Eh f4kYcrAmew5a+nyyI1X08z9c3kued+glUJeHLd4r7omxZSb81j94M32bM6bWZNn+ lavbG+LzEA8UVtI8HeWknZkdIGi2eTL4bNLcd3EdBoICGOV9EFs= =g3yx -----END PGP SIGNATURE----- --gqocpd2od3bxsp7n--