Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1281164 > unrolled thread

Re: [PATCH v5 08/10] spi: expose master transfer size limitation.

Started byMark Brown <broonie@kernel.org>
First post2015-12-01 21:00 +0100
Last post2015-12-02 11:00 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v5 08/10] spi: expose master transfer size limitation. Mark Brown <broonie@kernel.org> - 2015-12-01 21:00 +0100
    Re: [PATCH v5 08/10] spi: expose master transfer size limitation. Heiner Kallweit <hkallweit1@gmail.com> - 2015-12-01 22:10 +0100
      Re: [PATCH v5 08/10] spi: expose master transfer size limitation. Mark Brown <broonie@kernel.org> - 2015-12-01 22:40 +0100
    Re: [PATCH v5 08/10] spi: expose master transfer size limitation. Michal Suchanek <hramrach@gmail.com> - 2015-12-02 11:00 +0100

#1281164 — Re: [PATCH v5 08/10] spi: expose master transfer size limitation.

FromMark Brown <broonie@kernel.org>
Date2015-12-01 21:00 +0100
SubjectRe: [PATCH v5 08/10] spi: expose master transfer size limitation.
Message-ID<qAZfI-5yU-15@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Tue, Dec 01, 2015 at 04:51:06PM -0000, Michal Suchanek wrote:
> On some SPI controllers it is not feasible to transfer arbitrary amount
> of data at once.
> 
> When the limit on transfer size is a few kilobytes at least it makes
> sense to use the SPI hardware rather than reverting to gpio driver.

> +	/*
> +	 * on some hardware transfer size may be constrained
> +	 * the limit may depend on device transfer settings
> +	 */
> +	size_t (*max_transfer_size)(struct spi_device *spi);

Heiner submitted a *very* similar patch just now with a straight
variable plus accessor instead of a function and using a name with _msg.
I'm ambivalent on the implementation but prefer the naming here since
that's more the limitation we're trying to express I think (some
hardware does have limiations about multple transfers too).  Can the two
of you come up with something that works for both of you?

[toc] | [next] | [standalone]


#1281215

FromHeiner Kallweit <hkallweit1@gmail.com>
Date2015-12-01 22:10 +0100
Message-ID<qB0ls-6t4-3@gated-at.bofh.it>
In reply to#1281164
Am 01.12.2015 um 20:58 schrieb Mark Brown:
> On Tue, Dec 01, 2015 at 04:51:06PM -0000, Michal Suchanek wrote:
>> On some SPI controllers it is not feasible to transfer arbitrary amount
>> of data at once.
>>
>> When the limit on transfer size is a few kilobytes at least it makes
>> sense to use the SPI hardware rather than reverting to gpio driver.
> 
>> +	/*
>> +	 * on some hardware transfer size may be constrained
>> +	 * the limit may depend on device transfer settings
>> +	 */
>> +	size_t (*max_transfer_size)(struct spi_device *spi);
> 
> Heiner submitted a *very* similar patch just now with a straight
> variable plus accessor instead of a function and using a name with _msg.
> I'm ambivalent on the implementation but prefer the naming here since
> that's more the limitation we're trying to express I think (some
> hardware does have limiations about multple transfers too).  Can the two
> of you come up with something that works for both of you?
> 
Sure .. Just one inquiry:
When you say "the naming here" you refer to Michal's or my version?

Actually I like in Michal's hook that it directly takes a struct spi_device.
This saves the caller one level of indirection as the caller usually will
deal with a spi_device and not a spi_master.

If you're fine with Michal's version then this is also fine with me,
especially as the functionality is the same.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1281231

FromMark Brown <broonie@kernel.org>
Date2015-12-01 22:40 +0100
Message-ID<qB0Ou-6Du-9@gated-at.bofh.it>
In reply to#1281215

[Multipart message — attachments visible in raw view] — view raw

On Tue, Dec 01, 2015 at 10:07:55PM +0100, Heiner Kallweit wrote:

> Sure .. Just one inquiry:
> When you say "the naming here" you refer to Michal's or my version?

Michael's (transfer).

> Actually I like in Michal's hook that it directly takes a struct spi_device.
> This saves the caller one level of indirection as the caller usually will
> deal with a spi_device and not a spi_master.

> If you're fine with Michal's version then this is also fine with me,
> especially as the functionality is the same.

OK.

[toc] | [prev] | [next] | [standalone]


#1281567

FromMichal Suchanek <hramrach@gmail.com>
Date2015-12-02 11:00 +0100
Message-ID<qBcmB-5tS-1@gated-at.bofh.it>
In reply to#1281164
On 1 December 2015 at 20:58, Mark Brown <broonie@kernel.org> wrote:
> On Tue, Dec 01, 2015 at 04:51:06PM -0000, Michal Suchanek wrote:
>> On some SPI controllers it is not feasible to transfer arbitrary amount
>> of data at once.
>>
>> When the limit on transfer size is a few kilobytes at least it makes
>> sense to use the SPI hardware rather than reverting to gpio driver.
>
>> +     /*
>> +      * on some hardware transfer size may be constrained
>> +      * the limit may depend on device transfer settings
>> +      */
>> +     size_t (*max_transfer_size)(struct spi_device *spi);
>
> Heiner submitted a *very* similar patch just now with a straight
> variable plus accessor instead of a function and using a name with _msg.
> I'm ambivalent on the implementation but prefer the naming here since
> that's more the limitation we're trying to express I think (some
> hardware does have limiations about multple transfers too).  Can the two
> of you come up with something that works for both of you?

Sorry, missed there is a patch because it shows in the middle of the
discussion for me.

I don't really care which one it is so long as I can get the last
patch in this series based on it.

Thanks

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web