summaryrefslogtreecommitdiffstats
path: root/drivers/iio/magnetometer/hmc5843.h
AgeCommit message (Collapse)AuthorFilesLines
2022-08-15iio: magn: hmc5843: Move struct dev_pm_ops out of headerJonathan Cameron1-12/+1
Having this structure defined static in the header lead to unnecessary duplication and required additional symbol exports. Use the EXPORT_NS_SIMPLE_DEV_PM_OPS() to clean this up in the same fashion as many other drivers do this. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220807184534.1037363-3-jic23@kernel.org
2021-10-19iio: magn: hmc5843: Make hmc5843_common_remove() return voidUwe Kleine-König1-1/+1
Up to now hmc5843_common_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c and spi remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211013203223.2694577-14-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-05-17iio: magn: hmc5843: Fix buffer alignment in iio_push_to_buffers_with_timestamp()Jonathan Cameron1-2/+6
To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: 7247645f6865 ("iio: hmc5843: Move hmc5843 out of staging") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210501170121.512209-16-jic23@kernel.org
2020-07-20iio: magnetometer: hmc5843: 'hmc5843_pm_ops' is unused in 1 of 3 files ↵Lee Jones1-3/+3
including hmc5843_core.h We know that it's okay for 'hmc5843_pm_ops' to be unused here. Fixes the following W=1 kernel build warning(s): In file included from include/linux/device.h:25, from include/linux/iio/iio.h:10, from drivers/iio/magnetometer/hmc5843_core.c:16: drivers/iio/magnetometer/hmc5843.h:55:26: warning: ‘hmc5843_pm_ops’ defined but not used [-Wunused-const-variable=] 55 | static SIMPLE_DEV_PM_OPS(hmc5843_pm_ops, | ^~~~~~~~~~~~~~ include/linux/pm.h:354:25: note: in definition of macro ‘SIMPLE_DEV_PM_OPS’ 354 | const struct dev_pm_ops name = { | ^~~~ Cc: Josef Gajdusek <atx@atx.name> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-04iio: magnetometer: hmc5843: add mount matrix supportH. Nikolaus Schaller1-0/+1
This patch allows to read a mount-matrix device tree property and report to user-space or in-kernel iio clients. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-09-22iio: magnetometer: hmc5843: Fixed a comment error.Song Qiang1-1/+1
Replace 'hcm5843' with 'hmc5843'. Signed-off-by: Song Qiang <songqiang1304521@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2016-02-24iio: hmc5843: Move hmc5843 out of stagingCristina Moraru1-0/+65
This patch moves hmc5843 driver from staging/iio/magnetometer to iio/magnetometer, updates the corresponding Makefiles and moves the hmc5843* entries to the 'Industrial I/O support -> Magnetometer sensors' menu. Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Cc: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>