lkml.org 
[lkml]   [2021]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] spi: cadence-quadspi: Disable Auto-HW polling
On Fri, Jul 16, 2021 at 12:06:29AM +0530, Pratyush Yadav wrote:
> On 15/07/21 05:41PM, Mark Brown wrote:
> > On Thu, Jul 15, 2021 at 09:57:51PM +0530, Apurva Nandan wrote:

> But then the problem is how to tell the caller whether the poll actually
> happened or not. The other option I see is:

> ret = spi_mem_set_autopoll_op(mem, poll_op, mask, match, ...);
> spi_mem_exec_op(mem, op);
>
> if (ret == -EOPNOTSUPP)
> poll_status();

> When spi_mem_set_autopoll_op() is called, the controller driver can
> check if it can autopoll with this op. It can configure its autopoll
> feature based on this, and can provide feedback to the caller about
> whether they will then have to poll themselves, or it has already been
> done for them.

I was more thinking about just having polling be a separate operation
entirely, but you're right that a controller might integrate polling
with the actual operation so that won't do and we need something more
like you suggest.

> I like the latter option more.

Yes.

> I think the question we need to answer first is whether doing all this
> is worth the hassle. Are there enough controllers with this auto polling
> feature to make it worth the bother?

If we build it they will come! :P But yes, that's definitely a concern.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-07-16 20:05    [W:0.156 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site