linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Lars Poeschel <poeschel@lemonage.de>
Cc: Johan Hovold <johan@kernel.org>,
	devicetree@vger.kernel.org, Samuel Ortiz <sameo@linux.intel.com>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:NFC SUBSYSTEM" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v3 3/5] nfc: pn533: add UART phy driver
Date: Mon, 29 Oct 2018 17:13:28 +0100	[thread overview]
Message-ID: <20181029161328.GT27852@localhost> (raw)
In-Reply-To: <20181029155110.GA12914@lem-wkst-02.lemonage>

On Mon, Oct 29, 2018 at 04:51:10PM +0100, Lars Poeschel wrote:
> On Mon, Oct 29, 2018 at 12:07:04PM +0100, Johan Hovold wrote:

> > > Wouldn't that be the scope of another later patch then ?
> > 
> > Possibly. We have accepted some serdev drivers already taking the lazy
> > approach of opening the port in probe. Depending on the driver, it may
> > not be too bad (e.g. for some specific hardware which you know you'll
> > always use), but it not really nice to have everyone pay a price in
> > terms of power-consumption for a feature that is rarely used.
> 
> Is there a way in serdev to close a port, but still occupy it ?
> I'd like to do the basic chip initialisation in _probe and then close
> the port for power-consuption reasons. I'd like to have the port still
> occupied, so that it's not available to other possible users in the
> meantime. I'd then do a serdev open again in dev_up and really use it
> from there.
> dev_down is then for serdev close and also still occupy it.
> closing and releasing would then be done in _remove.

The serdev device is bound you driver regardless of whether you open the
port or not, so just use serdev_device_open() and serdev_device_close()
as necessary at probe() if you need to do some setup and then later at
dev_up() and dev_down(), respectively.

Johan

  reply	other threads:[~2018-10-29 16:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25 13:29 [PATCH v3 1/5] nfc: pn533: i2c: "pn532" as dt compatible string Lars Poeschel
2018-10-25 13:29 ` [PATCH v3 2/5] nfc: pn532_uart: Add NXP PN532 to devicetree docs Lars Poeschel
2018-10-25 21:54   ` Rob Herring
2018-10-26  7:59     ` Lars Poeschel
2018-10-25 13:29 ` [PATCH v3 3/5] nfc: pn533: add UART phy driver Lars Poeschel
2018-10-28 10:27   ` Johan Hovold
2018-10-28 13:46     ` Marcel Holtmann
2018-10-28 14:35       ` Johan Hovold
2018-10-29 10:02     ` Lars Poeschel
2018-10-29 11:07       ` Johan Hovold
2018-10-29 15:51         ` Lars Poeschel
2018-10-29 16:13           ` Johan Hovold [this message]
2018-10-25 13:29 ` [PATCH v3 4/5] nfc: pn533: Add autopoll capability Lars Poeschel
2018-10-25 13:29 ` [PATCH v3 5/5] nfc: pn532_uart: Make use of pn532 autopoll Lars Poeschel

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=20181029161328.GT27852@localhost \
    --to=johan@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=poeschel@lemonage.de \
    --cc=sameo@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).