* [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically
@ 2024-10-07 12:23 Bartosz Golaszewski
2024-10-07 12:23 ` [PATCH 2/3] mtd: rawnand: davinci: break the line correctly Bartosz Golaszewski
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2024-10-07 12:23 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Bastien Curutchet
Cc: linux-mtd, linux-kernel, Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
For better readability, put all includes in alphabetical order.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/mtd/nand/raw/davinci_nand.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index 392678143a36..5510b39c0b98 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -10,15 +10,15 @@
* Dirk Behme <Dirk.Behme@gmail.com>
*/
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/iopoll.h>
-#include <linux/mtd/rawnand.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
#include <linux/mtd/partitions.h>
-#include <linux/slab.h>
+#include <linux/mtd/rawnand.h>
#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
#define NRCSR_OFFSET 0x00
#define NANDFCR_OFFSET 0x60
--
2.43.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] mtd: rawnand: davinci: break the line correctly
2024-10-07 12:23 [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically Bartosz Golaszewski
@ 2024-10-07 12:23 ` Bartosz Golaszewski
2024-10-21 10:02 ` Miquel Raynal
2024-10-07 12:23 ` [PATCH 3/3] mtd: rawnand: davinci: use generic device property helpers Bartosz Golaszewski
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Bartosz Golaszewski @ 2024-10-07 12:23 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Bastien Curutchet
Cc: linux-mtd, linux-kernel, Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
The line in nand_davinci_get_pdata() prototype is broken in a weird and
unreadable way. Make it consistent with the rest of the code.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/mtd/nand/raw/davinci_nand.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index 5510b39c0b98..6c884b59bc98 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -487,8 +487,8 @@ static const struct of_device_id davinci_nand_of_match[] = {
};
MODULE_DEVICE_TABLE(of, davinci_nand_of_match);
-static struct davinci_nand_pdata
- *nand_davinci_get_pdata(struct platform_device *pdev)
+static struct davinci_nand_pdata *
+nand_davinci_get_pdata(struct platform_device *pdev)
{
if (!dev_get_platdata(&pdev->dev) && pdev->dev.of_node) {
struct davinci_nand_pdata *pdata;
@@ -557,8 +557,8 @@ static struct davinci_nand_pdata
return dev_get_platdata(&pdev->dev);
}
#else
-static struct davinci_nand_pdata
- *nand_davinci_get_pdata(struct platform_device *pdev)
+static struct davinci_nand_pdata *
+nand_davinci_get_pdata(struct platform_device *pdev)
{
return dev_get_platdata(&pdev->dev);
}
--
2.43.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] mtd: rawnand: davinci: use generic device property helpers
2024-10-07 12:23 [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically Bartosz Golaszewski
2024-10-07 12:23 ` [PATCH 2/3] mtd: rawnand: davinci: break the line correctly Bartosz Golaszewski
@ 2024-10-07 12:23 ` Bartosz Golaszewski
2024-10-21 10:02 ` Miquel Raynal
2024-10-21 7:25 ` [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically Bartosz Golaszewski
2024-10-21 10:02 ` Miquel Raynal
3 siblings, 1 reply; 8+ messages in thread
From: Bartosz Golaszewski @ 2024-10-07 12:23 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Bastien Curutchet
Cc: linux-mtd, linux-kernel, Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
There's no reason for this driver to be using OF-specific property
accessors. Switch to using generic device property interfaces and
replace the of.h include with property.h. This allows us to no longer
check the existence of the associated of_node.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/mtd/nand/raw/davinci_nand.c | 42 ++++++++++++++---------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index 6c884b59bc98..aa7619eec59e 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -16,8 +16,8 @@
#include <linux/module.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/rawnand.h>
-#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/slab.h>
#define NRCSR_OFFSET 0x00
@@ -490,7 +490,7 @@ MODULE_DEVICE_TABLE(of, davinci_nand_of_match);
static struct davinci_nand_pdata *
nand_davinci_get_pdata(struct platform_device *pdev)
{
- if (!dev_get_platdata(&pdev->dev) && pdev->dev.of_node) {
+ if (!dev_get_platdata(&pdev->dev)) {
struct davinci_nand_pdata *pdata;
const char *mode;
u32 prop;
@@ -501,23 +501,24 @@ nand_davinci_get_pdata(struct platform_device *pdev)
pdev->dev.platform_data = pdata;
if (!pdata)
return ERR_PTR(-ENOMEM);
- if (!of_property_read_u32(pdev->dev.of_node,
- "ti,davinci-chipselect", &prop))
+ if (!device_property_read_u32(&pdev->dev,
+ "ti,davinci-chipselect", &prop))
pdata->core_chipsel = prop;
else
return ERR_PTR(-EINVAL);
- if (!of_property_read_u32(pdev->dev.of_node,
- "ti,davinci-mask-ale", &prop))
+ if (!device_property_read_u32(&pdev->dev,
+ "ti,davinci-mask-ale", &prop))
pdata->mask_ale = prop;
- if (!of_property_read_u32(pdev->dev.of_node,
- "ti,davinci-mask-cle", &prop))
+ if (!device_property_read_u32(&pdev->dev,
+ "ti,davinci-mask-cle", &prop))
pdata->mask_cle = prop;
- if (!of_property_read_u32(pdev->dev.of_node,
- "ti,davinci-mask-chipsel", &prop))
+ if (!device_property_read_u32(&pdev->dev,
+ "ti,davinci-mask-chipsel", &prop))
pdata->mask_chipsel = prop;
- if (!of_property_read_string(pdev->dev.of_node,
- "ti,davinci-ecc-mode", &mode)) {
+ if (!device_property_read_string(&pdev->dev,
+ "ti,davinci-ecc-mode",
+ &mode)) {
if (!strncmp("none", mode, 4))
pdata->engine_type = NAND_ECC_ENGINE_TYPE_NONE;
if (!strncmp("soft", mode, 4))
@@ -525,16 +526,17 @@ nand_davinci_get_pdata(struct platform_device *pdev)
if (!strncmp("hw", mode, 2))
pdata->engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST;
}
- if (!of_property_read_u32(pdev->dev.of_node,
- "ti,davinci-ecc-bits", &prop))
+ if (!device_property_read_u32(&pdev->dev,
+ "ti,davinci-ecc-bits", &prop))
pdata->ecc_bits = prop;
- if (!of_property_read_u32(pdev->dev.of_node,
- "ti,davinci-nand-buswidth", &prop) && prop == 16)
+ if (!device_property_read_u32(&pdev->dev,
+ "ti,davinci-nand-buswidth",
+ &prop) && prop == 16)
pdata->options |= NAND_BUSWIDTH_16;
- if (of_property_read_bool(pdev->dev.of_node,
- "ti,davinci-nand-use-bbt"))
+ if (device_property_read_bool(&pdev->dev,
+ "ti,davinci-nand-use-bbt"))
pdata->bbt_options = NAND_BBT_USE_FLASH;
/*
@@ -548,10 +550,8 @@ nand_davinci_get_pdata(struct platform_device *pdev)
* then use "ti,davinci-nand" as the compatible in your
* device-tree file.
*/
- if (of_device_is_compatible(pdev->dev.of_node,
- "ti,keystone-nand")) {
+ if (device_is_compatible(&pdev->dev, "ti,keystone-nand"))
pdata->options |= NAND_NO_SUBPAGE_WRITE;
- }
}
return dev_get_platdata(&pdev->dev);
--
2.43.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically
2024-10-07 12:23 [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically Bartosz Golaszewski
2024-10-07 12:23 ` [PATCH 2/3] mtd: rawnand: davinci: break the line correctly Bartosz Golaszewski
2024-10-07 12:23 ` [PATCH 3/3] mtd: rawnand: davinci: use generic device property helpers Bartosz Golaszewski
@ 2024-10-21 7:25 ` Bartosz Golaszewski
2024-10-21 7:40 ` Miquel Raynal
2024-10-21 10:02 ` Miquel Raynal
3 siblings, 1 reply; 8+ messages in thread
From: Bartosz Golaszewski @ 2024-10-21 7:25 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Bastien Curutchet
Cc: linux-mtd, linux-kernel, Bartosz Golaszewski
On Mon, Oct 7, 2024 at 2:24 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> For better readability, put all includes in alphabetical order.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> drivers/mtd/nand/raw/davinci_nand.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
> index 392678143a36..5510b39c0b98 100644
> --- a/drivers/mtd/nand/raw/davinci_nand.c
> +++ b/drivers/mtd/nand/raw/davinci_nand.c
> @@ -10,15 +10,15 @@
> * Dirk Behme <Dirk.Behme@gmail.com>
> */
>
> -#include <linux/kernel.h>
> -#include <linux/module.h>
> -#include <linux/platform_device.h>
> #include <linux/err.h>
> #include <linux/iopoll.h>
> -#include <linux/mtd/rawnand.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> #include <linux/mtd/partitions.h>
> -#include <linux/slab.h>
> +#include <linux/mtd/rawnand.h>
> #include <linux/of.h>
> +#include <linux/platform_device.h>
> +#include <linux/slab.h>
>
> #define NRCSR_OFFSET 0x00
> #define NANDFCR_OFFSET 0x60
> --
> 2.43.0
>
It's been two weeks so gentle ping.
Bart
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically
2024-10-21 7:25 ` [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically Bartosz Golaszewski
@ 2024-10-21 7:40 ` Miquel Raynal
0 siblings, 0 replies; 8+ messages in thread
From: Miquel Raynal @ 2024-10-21 7:40 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Richard Weinberger, Vignesh Raghavendra, Bastien Curutchet,
linux-mtd, linux-kernel, Bartosz Golaszewski
Hi Bartosz,
brgl@bgdev.pl wrote on Mon, 21 Oct 2024 09:25:48 +0200:
> On Mon, Oct 7, 2024 at 2:24 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> >
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > For better readability, put all includes in alphabetical order.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---
...
>
> It's been two weeks so gentle ping.
The patches are good, I didn't took the time to queue them yet but I
plan on collecting all the pending patches (including yours) this week.
Sorry for the delay!
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] mtd: rawnand: davinci: use generic device property helpers
2024-10-07 12:23 ` [PATCH 3/3] mtd: rawnand: davinci: use generic device property helpers Bartosz Golaszewski
@ 2024-10-21 10:02 ` Miquel Raynal
0 siblings, 0 replies; 8+ messages in thread
From: Miquel Raynal @ 2024-10-21 10:02 UTC (permalink / raw)
To: Bartosz Golaszewski, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Bastien Curutchet
Cc: linux-mtd, linux-kernel, Bartosz Golaszewski
On Mon, 2024-10-07 at 12:23:50 UTC, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> There's no reason for this driver to be using OF-specific property
> accessors. Switch to using generic device property interfaces and
> replace the of.h include with property.h. This allows us to no longer
> check the existence of the associated of_node.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] mtd: rawnand: davinci: break the line correctly
2024-10-07 12:23 ` [PATCH 2/3] mtd: rawnand: davinci: break the line correctly Bartosz Golaszewski
@ 2024-10-21 10:02 ` Miquel Raynal
0 siblings, 0 replies; 8+ messages in thread
From: Miquel Raynal @ 2024-10-21 10:02 UTC (permalink / raw)
To: Bartosz Golaszewski, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Bastien Curutchet
Cc: linux-mtd, linux-kernel, Bartosz Golaszewski
On Mon, 2024-10-07 at 12:23:49 UTC, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> The line in nand_davinci_get_pdata() prototype is broken in a weird and
> unreadable way. Make it consistent with the rest of the code.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically
2024-10-07 12:23 [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically Bartosz Golaszewski
` (2 preceding siblings ...)
2024-10-21 7:25 ` [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically Bartosz Golaszewski
@ 2024-10-21 10:02 ` Miquel Raynal
3 siblings, 0 replies; 8+ messages in thread
From: Miquel Raynal @ 2024-10-21 10:02 UTC (permalink / raw)
To: Bartosz Golaszewski, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Bastien Curutchet
Cc: linux-mtd, linux-kernel, Bartosz Golaszewski
On Mon, 2024-10-07 at 12:23:48 UTC, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> For better readability, put all includes in alphabetical order.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-10-21 10:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 12:23 [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically Bartosz Golaszewski
2024-10-07 12:23 ` [PATCH 2/3] mtd: rawnand: davinci: break the line correctly Bartosz Golaszewski
2024-10-21 10:02 ` Miquel Raynal
2024-10-07 12:23 ` [PATCH 3/3] mtd: rawnand: davinci: use generic device property helpers Bartosz Golaszewski
2024-10-21 10:02 ` Miquel Raynal
2024-10-21 7:25 ` [PATCH 1/3] mtd: rawnand: davinci: order headers alphabetically Bartosz Golaszewski
2024-10-21 7:40 ` Miquel Raynal
2024-10-21 10:02 ` Miquel Raynal
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).