mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Hennerich <michael.hennerich@analog.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <linux-input@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [RFC/RFT PATCH 1/3] Input: ad7879 - convert to use regmap
Date: Mon, 20 Feb 2017 17:09:44 +0100	[thread overview]
Message-ID: <f80e36c9-8fc5-2faf-dfa6-df356ec9d4d2@analog.com> (raw)
In-Reply-To: <20170217233152.31715-1-dmitry.torokhov@gmail.com>

On 18.02.2017 00:31, Dmitry Torokhov wrote:
> Instead of rolling our own infrastructure to provide uniform access to I2C
> and SPI buses, let's switch to using regmap.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>
> Michael,
>
> I am a bit (actually a lot) confused how this driver was working with SPI
> and Blackfin, which is, as far as I understand, little-endian, because from
> my reading of the spec the data on wire is big-endian. If this is not
> correct we need to change spi regmap config to be:
>
> static const struct regmap_config ad7879_spi_regmap_config = {
> 	.reg_bits = 16,
> 	.val_bits = 16,
> 	.max_register = 15,
> 	.read_flag_mask = AD7879_CMD_MAGIC | AD7879_CMD_READ,
> 	.write_flag_mask = AD7879_CMD_MAGIC,
> 	.reg_format_endian_default = REGMAP_ENDIAN_LITTLE,
> 	.val_format_endian_default = REGMAP_ENDIAN_LITTLE,
> };
>
> Also, the original ad7879_spi_xfer was funky to tell the least. We
> allocated n+2 spi_transfer structures, then smashed the beginning of the
> first one with u16 command, then basically "restored" it???
>
> Anyway, if you could try it out (and fix ;) ), that would be great.

Hi Dimitry,

Thanks for doing this.
Overall looks great, but i definitely need to test this.
Your right this xfer functions looks awkward.
I'll review and get back to you.



-- 
Greetings,
Michael

--
Analog Devices GmbH      Otl-Aicher Strasse 60-64      80807 München
Sitz der Gesellschaft München, Registergericht München HRB 40368,
Geschäftsführer: Peter Kolberg, Ali Raza Husain, Eileen Wynne

      parent reply	other threads:[~2017-02-20 16:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 23:31 Dmitry Torokhov
2017-02-17 23:31 ` [RFC/RFT PATCH 2/3] Input: ad7879 - use more devm interfaces Dmitry Torokhov
2017-02-17 23:31 ` [RFC/RFT PATCH 3/3] Input: ad7879 - allow exporting AUX/VBAT/GPIO pin via device property Dmitry Torokhov
2017-02-20 16:09 ` Michael Hennerich [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=f80e36c9-8fc5-2faf-dfa6-df356ec9d4d2@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome