All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Rob Herring <robh@kernel.org>, Chris Healy <cphealy@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] serdev: Add minimal bus locking API
Date: Thu, 16 Mar 2017 07:37:59 -0700	[thread overview]
Message-ID: <CAHQ1cqGkWaZYkopXign9dxaAUv4Jbe5Kee8j-5Fkh6LX4r1i0A@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VdtSCyr+8WeB_dHuo-P3LddA8sRDeFJh0FS92E_Rhijcg@mail.gmail.com>

On Tue, Mar 14, 2017 at 4:20 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Tue, Mar 14, 2017 at 3:48 PM, Andrey Smirnov
> <andrew.smirnov@gmail.com> wrote:
>> Add minimal bus locking API which is useful for serial devices that
>> implement request-reply protocol
>
> Can you put an example here?
>
> I'm not sure mutex is needed at all.

My use case is a "supervisory" microcontroller connected to SoC via
UART various aspects of which are exposed via MFD. I saw this kind of
"device design pattern" a number of times in my career, so I thought
and abstraction to help dealing with cases like that might be useful.

However, since Rob mentioned that API's expectation is that any such
locking is driver's responsibility, I'll drop this patch.

Thanks,
Andrey Smirnov

  reply	other threads:[~2017-03-16 14:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 13:48 [PATCH 0/2] serdev API extension Andrey Smirnov
2017-03-14 13:48 ` [PATCH 1/2] serdev: Add serdev_device_write subroutine Andrey Smirnov
2017-03-14 23:17   ` Andy Shevchenko
2017-03-16 14:23     ` Andrey Smirnov
2017-03-16 15:09       ` Andy Shevchenko
2017-03-17 13:33         ` Andrey Smirnov
2017-03-15 14:18   ` Rob Herring
2017-03-16 13:33     ` Andrey Smirnov
2017-03-17 16:31       ` Rob Herring
2017-03-14 13:48 ` [PATCH 2/2] serdev: Add minimal bus locking API Andrey Smirnov
2017-03-14 23:20   ` Andy Shevchenko
2017-03-16 14:37     ` Andrey Smirnov [this message]
2017-03-15 14:25   ` Rob Herring

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=CAHQ1cqGkWaZYkopXign9dxaAUv4Jbe5Kee8j-5Fkh6LX4r1i0A@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=cphealy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh@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 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.