From: "Rafał Miłecki" <zajec5@gmail.com>
To: Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
Rob Herring <robh+dt@kernel.org>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
"Jonas Gorski" <jonas.gorski@gmail.com>,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH 2/2] mtd: bcm47xxpart: add of_match_table with a new DT binding
Date: Fri, 12 Jan 2018 10:33:54 +0100 [thread overview]
Message-ID: <20180112093354.17593-2-zajec5@gmail.com> (raw)
In-Reply-To: <20180112093354.17593-1-zajec5@gmail.com>
From: Rafał Miłecki <rafal@milecki.pl>
This allows using bcm47xxpart parser to support DT describing partitions
on a flash using "brcm,bcm947xx-cfe-partitions" compatible property. It
means this parser doesn't have to be explicitly selected by a flash
driver anymore. It can be used e.g. together with a generic m25p80 /
spi-nor if device is just properly described.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
drivers/mtd/bcm47xxpart.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mtd/bcm47xxpart.c b/drivers/mtd/bcm47xxpart.c
index fe2581d9d882..4bc2ad842eee 100644
--- a/drivers/mtd/bcm47xxpart.c
+++ b/drivers/mtd/bcm47xxpart.c
@@ -290,9 +290,16 @@ static int bcm47xxpart_parse(struct mtd_info *master,
return curr_part;
};
+static const struct of_device_id bcm47xxpart_of_match_table[] = {
+ { .compatible = "brcm,bcm947xx-cfe-partitions" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, bcm47xxpart_of_match_table);
+
static struct mtd_part_parser bcm47xxpart_mtd_parser = {
.parse_fn = bcm47xxpart_parse,
.name = "bcm47xxpart",
+ .of_match_table = bcm47xxpart_of_match_table,
};
module_mtd_part_parser(bcm47xxpart_mtd_parser);
--
2.11.0
next prev parent reply other threads:[~2018-01-12 9:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 9:33 [PATCH 1/2] dt-bindings: mtd: document Broadcom's BCM47xx partitions Rafał Miłecki
2018-01-12 9:33 ` Rafał Miłecki [this message]
2018-01-19 21:44 ` Rob Herring
2018-03-29 6:23 ` Rafał Miłecki
2018-05-05 21:47 ` Rafał Miłecki
2018-05-08 16: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=20180112093354.17593-2-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=jonas.gorski@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=mark.rutland@arm.com \
--cc=rafal@milecki.pl \
--cc=richard@nod.at \
--cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox