Re: adding hmc5883 driver

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

 



On 4/17/2012 9:51 PM, Marek Belisko wrote:
Hi,

I'm owner gta04 board which have hmc5883 compass.
I'm currently using hmc5843 iio staging driver with some hacks
(difference is only
for range and rate values) which is working fine. I would like ask for
opinion how to properly
add new device.

IMO options are:
1. add hmc5883 to DEVICE_TABLE with some flags and then use proper values for
one or another device (possibly rename driver to hmc58x3)
Don't rename the driver. Convention is the driver is named after the first device it supports. Nothing stops it supporting lots more. See the adc/max1363 for a big example. Wild card naming goes horribly wrong from time to time as marketting departments like
to name their products in illogical ways.

Otherwise, this is probably the best option given they sound pretty similar.

2. separate common functions from existing driver and use custom setup
for hmc5843
and hmc5883.
One driver sounds more sensible in this case.

Is there another way which I overlooked?

Thanks,

marek


--
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