From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Wolfram Sang <wsa@the-dreams.de>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Takashi Iwai <tiwai@suse.de>,
"russianneuromancer @ ya . ru" <russianneuromancer@ya.ru>,
Vincent Gerris <vgerris@gmail.com>,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH v2 1/5] i2c: designware: Rename accessor_flags to flags
Date: Sat, 10 Dec 2016 16:36:33 +0200 [thread overview]
Message-ID: <1481380593.7188.3.camel@linux.intel.com> (raw)
In-Reply-To: <20161210141908.16470-1-hdegoede@redhat.com>
On Sat, 2016-12-10 at 15:19 +0100, Hans de Goede wrote:
> Rename accessor_flags to flags, so that we can use the field for
> other flags too. This is a preparation patch for adding cherrytrail
> support to the punit semaphore code.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/i2c/busses/i2c-designware-core.c | 14 +++++++-------
> drivers/i2c/busses/i2c-designware-core.h | 2 +-
> drivers/i2c/busses/i2c-designware-platdrv.c | 2 +-
> 3 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-core.c
> b/drivers/i2c/busses/i2c-designware-core.c
> index b403fa5..b6a7989 100644
> --- a/drivers/i2c/busses/i2c-designware-core.c
> +++ b/drivers/i2c/busses/i2c-designware-core.c
> @@ -177,13 +177,13 @@ static u32 dw_readl(struct dw_i2c_dev *dev, int
> offset)
> {
> u32 value;
>
> - if (dev->accessor_flags & ACCESS_16BIT)
> + if (dev->flags & ACCESS_16BIT)
> value = readw_relaxed(dev->base + offset) |
> (readw_relaxed(dev->base + offset + 2) <<
> 16);
> else
> value = readl_relaxed(dev->base + offset);
>
> - if (dev->accessor_flags & ACCESS_SWAP)
> + if (dev->flags & ACCESS_SWAP)
> return swab32(value);
> else
> return value;
> @@ -191,10 +191,10 @@ static u32 dw_readl(struct dw_i2c_dev *dev, int
> offset)
>
> static void dw_writel(struct dw_i2c_dev *dev, u32 b, int offset)
> {
> - if (dev->accessor_flags & ACCESS_SWAP)
> + if (dev->flags & ACCESS_SWAP)
> b = swab32(b);
>
> - if (dev->accessor_flags & ACCESS_16BIT) {
> + if (dev->flags & ACCESS_16BIT) {
> writew_relaxed((u16)b, dev->base + offset);
> writew_relaxed((u16)(b >> 16), dev->base + offset +
> 2);
> } else {
> @@ -339,10 +339,10 @@ int i2c_dw_init(struct dw_i2c_dev *dev)
> reg = dw_readl(dev, DW_IC_COMP_TYPE);
> if (reg == ___constant_swab32(DW_IC_COMP_TYPE_VALUE)) {
> /* Configure register endianess access */
> - dev->accessor_flags |= ACCESS_SWAP;
> + dev->flags |= ACCESS_SWAP;
> } else if (reg == (DW_IC_COMP_TYPE_VALUE & 0x0000ffff)) {
> /* Configure register access mode 16bit */
> - dev->accessor_flags |= ACCESS_16BIT;
> + dev->flags |= ACCESS_16BIT;
> } else if (reg != DW_IC_COMP_TYPE_VALUE) {
> dev_err(dev->dev, "Unknown Synopsys component type: "
> "0x%08x\n", reg);
> @@ -886,7 +886,7 @@ static irqreturn_t i2c_dw_isr(int this_irq, void
> *dev_id)
> tx_aborted:
> if ((stat & (DW_IC_INTR_TX_ABRT | DW_IC_INTR_STOP_DET)) ||
> dev->msg_err)
> complete(&dev->cmd_complete);
> - else if (unlikely(dev->accessor_flags & ACCESS_INTR_MASK)) {
> + else if (unlikely(dev->flags & ACCESS_INTR_MASK)) {
> /* workaround to trigger pending interrupt */
> stat = dw_readl(dev, DW_IC_INTR_MASK);
> i2c_dw_disable_int(dev);
> diff --git a/drivers/i2c/busses/i2c-designware-core.h
> b/drivers/i2c/busses/i2c-designware-core.h
> index 0d44d2a..fb143f5 100644
> --- a/drivers/i2c/busses/i2c-designware-core.h
> +++ b/drivers/i2c/busses/i2c-designware-core.h
> @@ -95,7 +95,7 @@ struct dw_i2c_dev {
> unsigned int status;
> u32 abort_source;
> int irq;
> - u32 accessor_flags;
> + u32 flags;
> struct i2c_adapter adapter;
> u32 functionality;
> u32 master_cfg;
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c
> b/drivers/i2c/busses/i2c-designware-platdrv.c
> index 0b42a12..97a2ca1 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -112,7 +112,7 @@ static int dw_i2c_acpi_configure(struct
> platform_device *pdev)
>
> id = acpi_match_device(pdev->dev.driver->acpi_match_table,
> &pdev->dev);
> if (id && id->driver_data)
> - dev->accessor_flags |= (u32)id->driver_data;
> + dev->flags |= (u32)id->driver_data;
>
> return 0;
> }
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
prev parent reply other threads:[~2016-12-10 14:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-10 14:19 [PATCH v2 1/5] i2c: designware: Rename accessor_flags to flags Hans de Goede
2016-12-10 14:19 ` [PATCH v2 2/5] i2c: designware-baytrail: Pass dw_i2c_dev into helper functions Hans de Goede
2016-12-10 14:19 ` [PATCH v2 3/5] i2c: designware-baytrail: Only check iosf_mbi_available() for shared hosts Hans de Goede
2016-12-10 14:54 ` Andy Shevchenko
2016-12-10 19:26 ` Hans de Goede
2016-12-10 14:19 ` [PATCH v2 4/5] i2c: designware-baytrail: Force the CPU to C1 state while holding the punit semaphore Hans de Goede
2016-12-10 14:53 ` Andy Shevchenko
2016-12-10 19:33 ` Hans de Goede
2016-12-10 19:59 ` Hans de Goede
2016-12-25 18:31 ` Len Brown
2016-12-26 11:07 ` Hans de Goede
2016-12-31 21:29 ` Hans de Goede
2017-01-02 8:26 ` Andy Shevchenko
2016-12-10 14:19 ` [PATCH v2 5/5] i2c: designware-baytrail: Add support for cherrytrail Hans de Goede
2016-12-10 15:01 ` Andy Shevchenko
2016-12-10 14:36 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481380593.7188.3.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=russianneuromancer@ya.ru \
--cc=tiwai@suse.de \
--cc=vgerris@gmail.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).