From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleksij Rempel Subject: Re: [PATCH v1 18/40] i2c: imx: Use generic definitions for bus frequencies Date: Tue, 25 Feb 2020 09:18:05 +0100 Message-ID: References: <20200224151530.31713-1-andriy.shevchenko@linux.intel.com> <20200224151530.31713-18-andriy.shevchenko@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from metis.ext.pengutronix.de ([85.220.165.71]:54815 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729360AbgBYISI (ORCPT ); Tue, 25 Feb 2020 03:18:08 -0500 In-Reply-To: <20200224151530.31713-18-andriy.shevchenko@linux.intel.com> Content-Language: en-US Sender: linux-i2c-owner@vger.kernel.org List-Id: linux-i2c@vger.kernel.org To: Andy Shevchenko , Wolfram Sang , linux-i2c@vger.kernel.org Cc: Oleksij Rempel , Shawn Guo , Sascha Hauer On 24.02.20 16:15, Andy Shevchenko wrote: > Since we have generic definitions for bus frequencies, let's use them. > > Cc: Oleksij Rempel > Cc: Shawn Guo > Cc: Sascha Hauer > Signed-off-by: Andy Shevchenko Acked-by: Oleksij Rempel > --- > drivers/i2c/busses/i2c-imx.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c > index a3b61336fe55..f5ed0f38904c 100644 > --- a/drivers/i2c/busses/i2c-imx.c > +++ b/drivers/i2c/busses/i2c-imx.c > @@ -49,9 +49,6 @@ > /* This will be the driver name the kernel reports */ > #define DRIVER_NAME "imx-i2c" > > -/* Default value */ > -#define IMX_I2C_BIT_RATE 100000 /* 100kHz */ > - > /* > * Enable DMA if transfer byte size is bigger than this threshold. > * As the hardware request, it must bigger than 4 bytes.\ > @@ -1139,7 +1136,7 @@ static int i2c_imx_probe(struct platform_device *pdev) > goto rpm_disable; > > /* Set up clock divider */ > - i2c_imx->bitrate = IMX_I2C_BIT_RATE; > + i2c_imx->bitrate = I2C_STANDARD_MODE_FREQ; > ret = of_property_read_u32(pdev->dev.of_node, > "clock-frequency", &i2c_imx->bitrate); > if (ret < 0 && pdata && pdata->bitrate) > Kind regards, Oleksij Rempel -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |