From: Greg KH <gregkh@linuxfoundation.org>
To: Gregory Hermant <gregory.hermant@calao-systems.com>
Cc: linux-serial@vger.kernel.org, shc_work@mail.ru
Subject: Re: [PATCH] max310x: max3109_detect should use indirect addressing in SPI mode for REVID register
Date: Sun, 28 Sep 2014 21:32:24 -0400 [thread overview]
Message-ID: <20140929013224.GA22319@kroah.com> (raw)
In-Reply-To: <1409933256-32071-1-git-send-email-gregory.hermant@calao-systems.com>
On Fri, Sep 05, 2014 at 06:07:36PM +0200, Gregory Hermant wrote:
> This patch allows to read the REV_ID register in SPI mode and consequently
> to properly detect the max3109. Indeed in SPI mode, this register is only
> accessible by using indirect addressing.
>
> Signed-off-by: Gregory Hermant <gregory.hermant@calao-systems.com>
> ---
> drivers/tty/serial/max310x.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
> index 5183643..2d911f6 100644
> --- a/drivers/tty/serial/max310x.c
> +++ b/drivers/tty/serial/max310x.c
> @@ -369,10 +369,13 @@ static int max3109_detect(struct device *dev)
> unsigned int val = 0;
> int ret;
>
> - ret = regmap_read(s->regmap, MAX310X_REVID_REG, &val);
> + ret = regmap_write(s->regmap, MAX310X_GLOBALCMD_REG,
> + MAX310X_EXTREG_ENBL);
> if (ret)
> return ret;
> -
> +
Always run your patches through checkpatch.pl and never add new problems
to the existing codebase :(
prev parent reply other threads:[~2014-09-29 6:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 16:07 [PATCH] max310x: max3109_detect should use indirect addressing in SPI mode for REVID register Gregory Hermant
2014-09-05 17:30 ` Alexander Shiyan
2014-09-29 1:32 ` Greg KH [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=20140929013224.GA22319@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=gregory.hermant@calao-systems.com \
--cc=linux-serial@vger.kernel.org \
--cc=shc_work@mail.ru \
/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.