From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH v3 5/6] i2c: at91: print hardware version Date: Tue, 02 Jun 2015 17:37:34 +0300 Message-ID: <556DBFAE.3030502@cogentembedded.com> References: <0634557b81f0c255411b2f64d78d570267d53b63.1433250713.git.cyrille.pitchen@atmel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <0634557b81f0c255411b2f64d78d570267d53b63.1433250713.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Cyrille Pitchen , ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org, nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org Cc: mark.rutland-5wv7dgnIgG8@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org Hello. On 6/2/2015 4:18 PM, Cyrille Pitchen wrote: > The probe() function now prints the hardware version of the I2C > controller. > Signed-off-by: Cyrille Pitchen > --- > drivers/i2c/busses/i2c-at91.c | 4 ++++ > 1 file changed, 4 insertions(+) > diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c > index 67b4f15..340ce2e 100644 > --- a/drivers/i2c/busses/i2c-at91.c > +++ b/drivers/i2c/busses/i2c-at91.c [...] > @@ -872,6 +874,8 @@ static int at91_twi_probe(struct platform_device *pdev) > return rc; > } > > + dev_info(dev->dev, "version: 0x%x\n", at91_twi_read(dev, AT91_TWI_VER)); Use "%#x" instead please -- it's shorter. WBR, Sergei