Re: [PATCH v2 3/4] iio: imu: inv_mpu6050: Separate driver into core and i2c functionality.

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

 



On 02/04/2016 10:20 AM, Adriana Reus wrote:
[...]
> --- a/drivers/iio/imu/inv_mpu6050/Kconfig
> +++ b/drivers/iio/imu/inv_mpu6050/Kconfig
> @@ -4,11 +4,9 @@
>  
>  config INV_MPU6050_IIO
>  	tristate "Invensense MPU6050 devices"
> -	depends on I2C && SYSFS
> +	depends on SYSFS

This does not work 'select' overwrites 'depends'. So if the users selects
INV_MPU6050_I2C this will work even though SYSFS is not available and you'll
get compile errors. But then again I'm not sure how we could end up with IIO
enabled and SYSFS not, so maybe just drop that line in a cleanup patch.

The other thing is that INV_MPU6050_IIO is user selectable, but doesn't
actually provide any functionality. My personal preference would be to make
this non user selectable, like we do for the other IIO drivers with similar
structure.

>  	select IIO_BUFFER
>  	select IIO_TRIGGERED_BUFFER
[...]
[...]
> +static struct i2c_driver inv_mpu_driver = {
> +	.probe		=	inv_mpu_probe,
> +	.remove		=	inv_mpu_remove,
> +	.id_table	=	inv_mpu_id,
> +	.driver = {
> +		.owner	=	THIS_MODULE,

Drop the owner flag field, it wasn't part of the st

> +		.acpi_match_table = ACPI_PTR(inv_acpi_match),
> +		.name	=	"inv-mpu6050 i2c driver",
> +		.pm     =       &inv_mpu_pmops,
> +	},
> +};

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux