Hello Siddharth, On 02/28, Siddharth Menon wrote: > subject: Criteria for cleanup patch > > Hello again, > I was going through some of the staging drivers. There are quite a few > checkpatch warnings under rtl8723bs, but they are mostly styling changes. > Would sending in patches for these be appropriate? Maybe. Though, I think rtl8723bs wouldn't belong to IIO (maybe drivers/net/wireless) so I would ask that question at the wireless mailing list, linux-wireless@xxxxxxxxxxxxxxx. > > I had considered dt bindings earlier as they seemed like a more relevant > contribution. I did a quick look at the IIO staging drivers and here are some comments and improvement suggestions for those. drivers/staging/iio/accel/adis16203.c Suggested improvements: - Use include/linux/units.h - Drop spi_set_drvdata() drivers/staging/iio/adc/ad7816.c Looks interesting at first glance. Not complicated, yet something to play with as they have a "control byte" to select which channel to read and a CONVST pin to handle. drivers/staging/iio/addac/adt7316* The device can communicate through I2C or SPI so could use regmap API to standardize data transfers in the driver. There was an old patch updating to regmap https://marc.info/?l=linux-iio&m=154853847705361&w=2. Aside from I2C related changes by and minor clean up changes, this driver hasn't got updates in a while. Suggested improvements: - Use regmap to standardize data transfers. - Add devicetree documentation. - Check/change if attributes can use standard ABI and document those that are specific. drivers/staging/iio/frequency/ad9832* Suggested improvements: - Use devm_regulator_get_enable_read_voltage(). - Use FIELD_PREP to set bit fields. - Support for devicetree probing (struct for device match of_device_id). - Devicetree documentation. - Maybe drop platform data stuff. - Check/change if attributes can use standard ABI and document those that are specific. drivers/staging/iio/frequency/ad9834* Somewhat similar to ad9832. For updating the ABI, might be useful to check out previous patch set https://patchwork.kernel.org/project/linux-iio/patch/20190225191731.5822-2-beniamin.bia@xxxxxxxxxx/ Suggested improvements: - Support for devicetree probing (struct for device match of_device_id). - Devicetree documentation. - Check/change if attributes can use standard ABI and document those that are specific. drivers/staging/iio/impedance-analyzer/ad5933.c Suggested improvements: - Check/change if attributes can use standard ABI and document those that are specific. - Better test? Regards, Marcelo