diff for duplicates of <1488964229.2514.4.camel@baylibre.com> diff --git a/a/1.txt b/N1/1.txt index f09d1f2..4fc4947 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -5,8 +5,8 @@ On Wed, 2017-03-08 at 07:44 +0100, Heiner Kallweit wrote: > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> > --- -> ?drivers/i2c/busses/i2c-meson.c | 13 +++++-------- -> ?1 file changed, 5 insertions(+), 8 deletions(-) +> drivers/i2c/busses/i2c-meson.c | 13 +++++-------- +> 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c- > meson.c @@ -14,63 +14,63 @@ On Wed, 2017-03-08 at 07:44 +0100, Heiner Kallweit wrote: > --- a/drivers/i2c/busses/i2c-meson.c > +++ b/drivers/i2c/busses/i2c-meson.c > @@ -38,7 +38,6 @@ -> ?#define REG_CTRL_CLKDIV_MASK ((BIT(10) - 1) << +> #define REG_CTRL_CLKDIV_MASK ((BIT(10) - 1) << > REG_CTRL_CLKDIV_SHIFT) -> ? -> ?#define I2C_TIMEOUT_MS 500 +> +> #define I2C_TIMEOUT_MS 500 > -#define DEFAULT_FREQ 100000 -> ? -> ?enum { -> ? TOKEN_END = 0, +> +> enum { +> TOKEN_END = 0, > @@ -73,7 +72,7 @@ enum { -> ? * @error: Flag set when an error is received -> ? * @lock: To avoid race conditions between irq handler and +> * @error: Flag set when an error is received +> * @lock: To avoid race conditions between irq handler and > xfer code -> ? * @done: Completion used to wait for transfer termination +> * @done: Completion used to wait for transfer termination > - * @frequency: Operating frequency of I2C bus clock > + * @timings: Struct including the bus frequency -> ? * @tokens: Sequence of tokens to be written to the device -> ? * @num_tokens: Number of tokens -> ? */ +> * @tokens: Sequence of tokens to be written to the device +> * @num_tokens: Number of tokens +> */ > @@ -92,7 +91,7 @@ struct meson_i2c { -> ? -> ? spinlock_t lock; -> ? struct completion done; +> +> spinlock_t lock; +> struct completion done; > - unsigned int frequency; > + struct i2c_timings timings; -> ? u32 tokens[2]; -> ? int num_tokens; -> ?}; +> u32 tokens[2]; +> int num_tokens; +> }; > @@ -136,12 +135,12 @@ static void meson_i2c_set_clk_div(struct > meson_i2c *i2c) -> ? unsigned long clk_rate = clk_get_rate(i2c->clk); -> ? unsigned int div; -> ? +> unsigned long clk_rate = clk_get_rate(i2c->clk); +> unsigned int div; +> > - div = DIV_ROUND_UP(clk_rate, i2c->frequency * 4); > + div = DIV_ROUND_UP(clk_rate, i2c->timings.bus_freq_hz * 4); -> ? meson_i2c_set_mask(i2c, REG_CTRL, REG_CTRL_CLKDIV_MASK, -> ? ???div << REG_CTRL_CLKDIV_SHIFT); -> ? -> ? dev_dbg(i2c->dev, "%s: clk %lu, freq %u, div %u\n", +> meson_i2c_set_mask(i2c, REG_CTRL, REG_CTRL_CLKDIV_MASK, +> div << REG_CTRL_CLKDIV_SHIFT); +> +> dev_dbg(i2c->dev, "%s: clk %lu, freq %u, div %u\n", > __func__, > - clk_rate, i2c->frequency, div); > + clk_rate, i2c->timings.bus_freq_hz, div); -> ?} -> ? -> ?static void meson_i2c_get_data(struct meson_i2c *i2c, char *buf, int +> } +> +> static void meson_i2c_get_data(struct meson_i2c *i2c, char *buf, int > len) > @@ -396,9 +395,7 @@ static int meson_i2c_probe(struct platform_device > *pdev) -> ? if (!i2c) -> ? return -ENOMEM; -> ? +> if (!i2c) +> return -ENOMEM; +> > - if (of_property_read_u32(pdev->dev.of_node, "clock- > frequency", -> - ?&i2c->frequency)) +> - &i2c->frequency)) > - i2c->frequency = DEFAULT_FREQ; > + i2c_parse_fw_timings(&pdev->dev, &i2c->timings, true); -> ? -> ? i2c->dev = &pdev->dev; -> ? platform_set_drvdata(pdev, i2c); +> +> i2c->dev = &pdev->dev; +> platform_set_drvdata(pdev, i2c); Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> diff --git a/a/content_digest b/N1/content_digest index a767676..60866cc 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,9 +1,12 @@ "ref\0d5f0545a-fb4c-b436-20f5-7df9d10605b1@gmail.com\0" "ref\0a8a8f3e8-4568-67a9-25bc-874c6f426243@gmail.com\0" - "From\0jbrunet@baylibre.com (Jerome Brunet)\0" - "Subject\0[PATCH 03/12] i2c: meson: use i2c core for DT clock-frequency parsing\0" + "From\0Jerome Brunet <jbrunet@baylibre.com>\0" + "Subject\0Re: [PATCH 03/12] i2c: meson: use i2c core for DT clock-frequency parsing\0" "Date\0Wed, 08 Mar 2017 10:10:29 +0100\0" - "To\0linus-amlogic@lists.infradead.org\0" + "To\0Heiner Kallweit <hkallweit1@gmail.com>" + " Wolfram Sang <wsa@the-dreams.de>\0" + "Cc\0linux-amlogic@lists.infradead.org" + " linux-i2c@vger.kernel.org <linux-i2c@vger.kernel.org>\0" "\00:1\0" "b\0" "On Wed, 2017-03-08 at 07:44 +0100, Heiner Kallweit wrote:\n" @@ -13,8 +16,8 @@ "> \n" "> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>\n" "> ---\n" - "> ?drivers/i2c/busses/i2c-meson.c | 13 +++++--------\n" - "> ?1 file changed, 5 insertions(+), 8 deletions(-)\n" + "> \302\240drivers/i2c/busses/i2c-meson.c | 13 +++++--------\n" + "> \302\2401 file changed, 5 insertions(+), 8 deletions(-)\n" "> \n" "> diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-\n" "> meson.c\n" @@ -22,65 +25,65 @@ "> --- a/drivers/i2c/busses/i2c-meson.c\n" "> +++ b/drivers/i2c/busses/i2c-meson.c\n" "> @@ -38,7 +38,6 @@\n" - "> ?#define REG_CTRL_CLKDIV_MASK\t((BIT(10) - 1) <<\n" + "> \302\240#define REG_CTRL_CLKDIV_MASK\t((BIT(10) - 1) <<\n" "> REG_CTRL_CLKDIV_SHIFT)\n" - "> ?\n" - "> ?#define I2C_TIMEOUT_MS\t\t500\n" + "> \302\240\n" + "> \302\240#define I2C_TIMEOUT_MS\t\t500\n" "> -#define DEFAULT_FREQ\t\t100000\n" - "> ?\n" - "> ?enum {\n" - "> ?\tTOKEN_END = 0,\n" + "> \302\240\n" + "> \302\240enum {\n" + "> \302\240\tTOKEN_END = 0,\n" "> @@ -73,7 +72,7 @@ enum {\n" - "> ? * @error:\tFlag set when an error is received\n" - "> ? * @lock:\tTo avoid race conditions between irq handler and\n" + "> \302\240 * @error:\tFlag set when an error is received\n" + "> \302\240 * @lock:\tTo avoid race conditions between irq handler and\n" "> xfer code\n" - "> ? * @done:\tCompletion used to wait for transfer termination\n" + "> \302\240 * @done:\tCompletion used to wait for transfer termination\n" "> - * @frequency:\tOperating frequency of I2C bus clock\n" "> + * @timings:\tStruct including the bus frequency\n" - "> ? * @tokens:\tSequence of tokens to be written to the device\n" - "> ? * @num_tokens:\tNumber of tokens\n" - "> ? */\n" + "> \302\240 * @tokens:\tSequence of tokens to be written to the device\n" + "> \302\240 * @num_tokens:\tNumber of tokens\n" + "> \302\240 */\n" "> @@ -92,7 +91,7 @@ struct meson_i2c {\n" - "> ?\n" - "> ?\tspinlock_t\t\tlock;\n" - "> ?\tstruct completion\tdone;\n" + "> \302\240\n" + "> \302\240\tspinlock_t\t\tlock;\n" + "> \302\240\tstruct completion\tdone;\n" "> -\tunsigned int\t\tfrequency;\n" "> +\tstruct i2c_timings\ttimings;\n" - "> ?\tu32\t\t\ttokens[2];\n" - "> ?\tint\t\t\tnum_tokens;\n" - "> ?};\n" + "> \302\240\tu32\t\t\ttokens[2];\n" + "> \302\240\tint\t\t\tnum_tokens;\n" + "> \302\240};\n" "> @@ -136,12 +135,12 @@ static void meson_i2c_set_clk_div(struct\n" "> meson_i2c *i2c)\n" - "> ?\tunsigned long clk_rate = clk_get_rate(i2c->clk);\n" - "> ?\tunsigned int div;\n" - "> ?\n" + "> \302\240\tunsigned long clk_rate = clk_get_rate(i2c->clk);\n" + "> \302\240\tunsigned int div;\n" + "> \302\240\n" "> -\tdiv = DIV_ROUND_UP(clk_rate, i2c->frequency * 4);\n" "> +\tdiv = DIV_ROUND_UP(clk_rate, i2c->timings.bus_freq_hz * 4);\n" - "> ?\tmeson_i2c_set_mask(i2c, REG_CTRL, REG_CTRL_CLKDIV_MASK,\n" - "> ?\t\t\t???div << REG_CTRL_CLKDIV_SHIFT);\n" - "> ?\n" - "> ?\tdev_dbg(i2c->dev, \"%s: clk %lu, freq %u, div %u\\n\",\n" + "> \302\240\tmeson_i2c_set_mask(i2c, REG_CTRL, REG_CTRL_CLKDIV_MASK,\n" + "> \302\240\t\t\t\302\240\302\240\302\240div << REG_CTRL_CLKDIV_SHIFT);\n" + "> \302\240\n" + "> \302\240\tdev_dbg(i2c->dev, \"%s: clk %lu, freq %u, div %u\\n\",\n" "> __func__,\n" "> -\t\tclk_rate, i2c->frequency, div);\n" "> +\t\tclk_rate, i2c->timings.bus_freq_hz, div);\n" - "> ?}\n" - "> ?\n" - "> ?static void meson_i2c_get_data(struct meson_i2c *i2c, char *buf, int\n" + "> \302\240}\n" + "> \302\240\n" + "> \302\240static void meson_i2c_get_data(struct meson_i2c *i2c, char *buf, int\n" "> len)\n" "> @@ -396,9 +395,7 @@ static int meson_i2c_probe(struct platform_device\n" "> *pdev)\n" - "> ?\tif (!i2c)\n" - "> ?\t\treturn -ENOMEM;\n" - "> ?\n" + "> \302\240\tif (!i2c)\n" + "> \302\240\t\treturn -ENOMEM;\n" + "> \302\240\n" "> -\tif (of_property_read_u32(pdev->dev.of_node, \"clock-\n" "> frequency\",\n" - "> -\t\t\t\t?&i2c->frequency))\n" + "> -\t\t\t\t\302\240&i2c->frequency))\n" "> -\t\ti2c->frequency = DEFAULT_FREQ;\n" "> +\ti2c_parse_fw_timings(&pdev->dev, &i2c->timings, true);\n" - "> ?\n" - "> ?\ti2c->dev = &pdev->dev;\n" - "> ?\tplatform_set_drvdata(pdev, i2c);\n" + "> \302\240\n" + "> \302\240\ti2c->dev = &pdev->dev;\n" + "> \302\240\tplatform_set_drvdata(pdev, i2c);\n" "\n" Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> -11a44527fedeb3ea37d1c96ed4cecbf1db11593436b09dd6e85dcbeaeb82f4b6 +93ea5a8c1d4b1cf69d9a8fa45f9163e5efb4c8460fa3b1e7cef94fa696f30aad
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.