diff mbox series

[v2,1/1] spi: pxa2xx: add driver enabling message

Message ID 1554889624-25000-1-git-send-email-f.suligoi@asem.it (mailing list archive)
State New, archived
Headers show
Series [v2,1/1] spi: pxa2xx: add driver enabling message | expand

Commit Message

Flavio Suligoi April 10, 2019, 9:47 a.m. UTC
Add an info message for the PXA2xx device driver start-up,
with the indication of:

- mode (slave device or master controller)
- transfer mode (DMA or GPIO)

Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
---

v1:	- first version
v2:	- remove warning message "no DMA channels available, using PIO"
	- add "slave device"/"master controller" indication message

 drivers/spi/spi-pxa2xx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Jarkko Nikula April 10, 2019, 10:11 a.m. UTC | #1
On 4/10/19 12:47 PM, Flavio Suligoi wrote:
> Add an info message for the PXA2xx device driver start-up,
> with the indication of:
> 
> - mode (slave device or master controller)
> - transfer mode (DMA or GPIO)
> 
> Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
> ---
> 
> v1:	- first version
> v2:	- remove warning message "no DMA channels available, using PIO"
> 	- add "slave device"/"master controller" indication message
> 
>   drivers/spi/spi-pxa2xx.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
> index f7068cc..b9e04e2 100644
> --- a/drivers/spi/spi-pxa2xx.c
> +++ b/drivers/spi/spi-pxa2xx.c
> @@ -1696,7 +1696,6 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
>   	if (platform_info->enable_dma) {
>   		status = pxa2xx_spi_dma_setup(drv_data);
>   		if (status) {
> -			dev_warn(dev, "no DMA channels available, using PIO\n");
>   			platform_info->enable_dma = false;
>   		} else {
>   			controller->can_dma = pxa2xx_spi_can_dma;
> @@ -1818,6 +1817,10 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
>   	pm_runtime_set_active(&pdev->dev);
>   	pm_runtime_enable(&pdev->dev);
>   
> +	dev_info(dev, "PXA2xx SPI %s (%s mode)\n",
> +		platform_info->is_slave ? "slave device" : "master controller",
> +		platform_info->enable_dma ? "DMA" : "PIO");
> +

"slave device" is ambiguous. Please use "controller" with both, i.e. 
"PXA2xx SPI %s controller (%s mode)\n", ... ? "slave" : "master", ...

With that changed you may add:

Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Flavio Suligoi April 10, 2019, 10:16 a.m. UTC | #2
> On 4/10/19 12:47 PM, Flavio Suligoi wrote:
> > Add an info message for the PXA2xx device driver start-up,
> > with the indication of:
> >
> > - mode (slave device or master controller)
> > - transfer mode (DMA or GPIO)
> >
> > Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
> > ---
> >
> > v1:	- first version
> > v2:	- remove warning message "no DMA channels available, using PIO"
> > 	- add "slave device"/"master controller" indication message
> >
> >   drivers/spi/spi-pxa2xx.c | 5 ++++-
> >   1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
> > index f7068cc..b9e04e2 100644
> > --- a/drivers/spi/spi-pxa2xx.c
> > +++ b/drivers/spi/spi-pxa2xx.c
> > @@ -1696,7 +1696,6 @@ static int pxa2xx_spi_probe(struct platform_device
> *pdev)
> >   	if (platform_info->enable_dma) {
> >   		status = pxa2xx_spi_dma_setup(drv_data);
> >   		if (status) {
> > -			dev_warn(dev, "no DMA channels available, using PIO\n");
> >   			platform_info->enable_dma = false;
> >   		} else {
> >   			controller->can_dma = pxa2xx_spi_can_dma;
> > @@ -1818,6 +1817,10 @@ static int pxa2xx_spi_probe(struct
> platform_device *pdev)
> >   	pm_runtime_set_active(&pdev->dev);
> >   	pm_runtime_enable(&pdev->dev);
> >
> > +	dev_info(dev, "PXA2xx SPI %s (%s mode)\n",
> > +		platform_info->is_slave ? "slave device" : "master
> controller",
> > +		platform_info->enable_dma ? "DMA" : "PIO");
> > +
> 
> "slave device" is ambiguous. Please use "controller" with both, i.e.
> "PXA2xx SPI %s controller (%s mode)\n", ... ? "slave" : "master", ...
> 
> With that changed you may add:
> 
> Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Ok

Flavio
diff mbox series

Patch

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index f7068cc..b9e04e2 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1696,7 +1696,6 @@  static int pxa2xx_spi_probe(struct platform_device *pdev)
 	if (platform_info->enable_dma) {
 		status = pxa2xx_spi_dma_setup(drv_data);
 		if (status) {
-			dev_warn(dev, "no DMA channels available, using PIO\n");
 			platform_info->enable_dma = false;
 		} else {
 			controller->can_dma = pxa2xx_spi_can_dma;
@@ -1818,6 +1817,10 @@  static int pxa2xx_spi_probe(struct platform_device *pdev)
 	pm_runtime_set_active(&pdev->dev);
 	pm_runtime_enable(&pdev->dev);
 
+	dev_info(dev, "PXA2xx SPI %s (%s mode)\n",
+		platform_info->is_slave ? "slave device" : "master controller",
+		platform_info->enable_dma ? "DMA" : "PIO");
+
 	/* Register with the SPI framework */
 	platform_set_drvdata(pdev, drv_data);
 	status = devm_spi_register_controller(&pdev->dev, controller);