All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	linux-kernel@vger.kernel.org, linux@ew.tq-group.com
Subject: Re: [PATCH v2 1/3] mfd: tqmx86: do not access I2C_DETECT register through io_base
Date: Fri, 3 Mar 2023 12:04:29 +0000	[thread overview]
Message-ID: <20230303120429.GJ2420672@google.com> (raw)
In-Reply-To: <e8300a30f0791afb67d79db8089fb6004855f378.1676892223.git.matthias.schiffer@ew.tq-group.com>

On Mon, 20 Feb 2023, Matthias Schiffer wrote:

> The I2C_DETECT register is at IO port 0x1a7, which is outside the range
> passed to devm_ioport_map() for io_base, and was only working because
> there aren't actually any bounds checks for IO port accesses.
> 
> Extending the range does not seem like a good solution here, as it would
> then conflict with the IO resource assigned to the I2C controller. As
> this is just a one-off access during probe, use a simple inb() instead.
> 
> While we're at it, drop the unused define TQMX86_REG_I2C_INT_EN.
> 
> Fixes: 2f17dd34ffed ("mfd: tqmx86: IO controller with I2C, Wachdog and GPIO")
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> ---
> 
> Notes:
>     v2: add comment regarding use of inb() as suggested by Andrew
> 
>  drivers/mfd/tqmx86.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

Applied, thanks

-- 
Lee Jones [李琼斯]

      parent reply	other threads:[~2023-03-03 12:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 11:25 [PATCH v2 1/3] mfd: tqmx86: do not access I2C_DETECT register through io_base Matthias Schiffer
2023-02-20 11:25 ` [PATCH v2 2/3] mfd: tqmx86: specify IO port register range more precisely Matthias Schiffer
2023-03-03 12:04   ` Lee Jones
2023-02-20 11:25 ` [PATCH v2 3/3] mfd: tqmx86: correct board names for TQMxE39x Matthias Schiffer
2023-03-03 12:05   ` Lee Jones
2023-02-20 13:48 ` [PATCH v2 1/3] mfd: tqmx86: do not access I2C_DETECT register through io_base Andrew Lunn
2023-03-03 12:04 ` Lee Jones [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=20230303120429.GJ2420672@google.com \
    --to=lee@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@ew.tq-group.com \
    --cc=matthias.schiffer@ew.tq-group.com \
    /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 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.