public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Alban <albeu@free.fr>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Aban Bedel <albeu@free.fr>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Richard Weinberger <richard@nod.at>,
	Marek Vasut <marek.vasut@gmail.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Cyrille Pitchen <cyrille.pitchen@atmel.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 3/3] ath9k: ahb: Add OF support
Date: Mon, 27 Feb 2017 23:48:13 +0100	[thread overview]
Message-ID: <20170227234813.2a077471@tock> (raw)
In-Reply-To: <CACna6rzZ-UiJR8oBJ9oHE+ZNT=nm6oLiKyW4bsiZ34TMRDh5Xw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]

On Mon, 27 Feb 2017 22:13:21 +0100
Rafał Miłecki <zajec5@gmail.com> wrote:

> Why you didn't cc linux-wireless?!?!

I first wanted to be sure that the devdata part was generally
acceptable, this patch was just included as an example of a user.
But it sound like that part will have to move to nvmem first.
I'll come back with a new patch once MTD support for nvmem is
done.

> On 27 February 2017 at 21:28, Alban <albeu@free.fr> wrote:
> > @@ -513,6 +515,43 @@ static void ath9k_eeprom_release(struct ath_softc *sc)
> >         release_firmware(sc->sc_ah->eeprom_blob);
> >  }
> >
> > +#ifdef CONFIG_OF
> > +static int ath9k_init_of(struct ath_softc *sc)
> > +{
> > +       struct device_node *np = sc->dev->of_node;
> > +       struct ath_hw *ah = sc->sc_ah;
> > +       const void *macaddr;
> > +       struct clk *clk;
> > +       int ret = 0;
> > +
> > +       if (!np) {
> > +               dev_err(sc->dev, "no platform data or OF node\n");
> > +               return -EINVAL;
> > +       }
> > +
> > +       clk = clk_get(sc->dev, "ref");
> > +       if (!IS_ERR(clk)) {
> > +               ah->is_clk_25mhz = (clk_get_rate(clk) == 25000000);
> > +               clk_put(clk);
> > +       }
> > +
> > +       ah->disable_2ghz = of_property_read_bool(np, "qca,disable-2ghz");
> > +       ah->disable_5ghz = of_property_read_bool(np, "qca,disable-5ghz");  
> 
> Please use ieee80211-freq-limit:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b330b25eaabda00d74e47566d9200907da381896
> 
> Most likely with the wiphy_read_of_freq_limits helper:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e691ac2f75b69bee743f0370d79454ba4429b17
> 
> Example:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0f83ff69735651cc7a3d150466a5257ff829b62b

Thanks, I'll check this.

Alban

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2017-02-27 22:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 20:28 [RFC 0/3] drivers: Add an API to read device specific config data Alban
2017-02-27 20:28 ` [PATCH 1/3] " Alban
2017-02-27 20:28 ` [PATCH 2/3] mtd: Add support for reading device data out of MTD devices Alban
2017-02-27 20:28 ` [PATCH 3/3] ath9k: ahb: Add OF support Alban
2017-02-27 21:13   ` Rafał Miłecki
2017-02-27 22:48     ` Alban [this message]
2017-02-27 22:54       ` Rafał Miłecki
2017-02-28 18:03   ` kbuild test robot
2017-02-27 20:42 ` [RFC 0/3] drivers: Add an API to read device specific config data Boris Brezillon
2017-02-27 22:26   ` Moritz Fischer
2017-02-27 22:41   ` Alban
2017-02-27 20:42 ` Marek Vasut

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=20170227234813.2a077471@tock \
    --to=albeu@free.fr \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=zajec5@gmail.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