Re: [PATCH 4/6] * Register platform interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan,

On Fri, Jul 23, 2010 at 02:52:21PM +0100, Alan Cox wrote:
> -static struct spi_driver mrstouch_driver = {
> +static struct platform_driver mrstouch_driver = {
>  	.driver = {
>  		.name   = "pmic_touch",
> -		.bus    = &spi_bus_type,
>  		.owner  = THIS_MODULE,
>  	},
>  	.probe          = mrstouch_probe,
> @@ -725,13 +722,13 @@ static struct spi_driver mrstouch_driver = {
>  
>  static int __init mrstouch_init(void)
>  {
> -	return spi_register_driver(&mrstouch_driver);
> +	return platform_driver_register(&mrstouch_driver);
>  }
>  module_init(mrstouch_init);
>  
>  static void __exit mrstouch_exit(void)
>  {
> -	spi_unregister_driver(&mrstouch_driver);
> +	platform_driver_unregister(&mrstouch_driver);
>  }
>  module_exit(mrstouch_exit);
>  

I am confused here... Are you having a separate SPI driver create a
platform device and then you have mrstouch to bind to this intermediate
platform device? Are you doing that so you can introduce I2C interface
later? If so I think I prefer how adxl34x and ad7879 drivers are
structured - they are split into core and interface parts but do not
require extra devices/drivers (see in my 'next' brnach).

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux