gpiolib: split character device into gpiolib-cdev
Kent Gibson
reviewerPATCH v3 1/1 gpiolib: split character device into gpiolib-cdev
Split the cdev specific functionality out of gpiolib.c and into gpiolib-cdev.c. This improves the readability and maintainability of both the cdev and core gpiolib code.
---
Changes in v3:
- updated the gpiolib-cdev.c file comment.
- rebased to latest gpio/devel (no changes impacted this patch)
- dropped the patch commentary as the points mentioned are mostly resolved - there still remain a couple of commits in gpio/fixes that will conflict...
drivers/gpio/Makefile | 1 + drivers/gpio/gpiolib-cdev.c | 1147 +++++++++++++++++++++++++++++++++++ drivers/gpio/gpiolib-cdev.h | 11 + drivers/gpio/gpiolib.c | 1112 +-------------------------------- 4 files changed, 1163 insertions(+), 1108 deletions(-) create mode 100644 drivers/gpio/gpiolib-cdev.c create mode 100644 drivers/gpio/gpiolib-cdev.h
drivers/gpio/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_GPIOLIB) += gpiolib.o obj-$(CONFIG_GPIOLIB) += gpiolib-devres.o obj-$(CONFIG_GPIOLIB) += gpiolib-legacy.o obj-$(CONFIG_GPIOLIB) += gpiolib-devprop.o +obj-$(CONFIG_GPIOLIB) += gpiolib-cdev.o obj-$(CONFIG_OF_GPIO) += gpiolib-of.o obj-$(CONFIG_GPIO_SYSFS) += gpiolib-sysfs.o obj-$(CONFIG_GPIO_ACPI) += gpiolib-acpi.o
drivers/gpio/gpiolib-cdev.c new file +1147 -0
1,147 lines not on this page · raw message
drivers/gpio/gpiolib-cdev.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef GPIOLIB_CDEV_H +#define GPIOLIB_CDEV_H + +#include <linux/device.h> + +int gpiolib_cdev_register (struct gpio_device *gdev,dev_t devt); +void gpiolib_cdev_unregister (struct gpio_device *gdev); + +#endif /* GPIOLIB_CDEV_H */
drivers/gpio/gpiolib.c +4 -1108
1,153 lines not on this page · raw message
base-commit: 74910e15ab25f95f162bc4d4a634d029186543ce
Signature · 1 line
2.27.0
Quoted 7 lines · Kent Gibson
Split the cdev specific functionality out of
gpiolib.cand intogpiolib-cdev.c. This improves the readability and maintainability of both the cdev and core gpiolib code.Suggested-by Bartosz Golaszewski <[email protected]>Signed-off-by Kent Gibson <[email protected]>
Quoted 8 lines
---
Changes in v3:
- updated thegpiolib-cdev.cfile comment.
- rebased to latest gpio/devel (no changes impacted this patch)
- dropped the patch commentary as the points mentioned are mostly resolved - there still remain a couple of commits in gpio/fixes that will conflict...
I rebased my GPIO tree on v5.8-rc1 and the old version of the patch did not apply and neither did this, could you rebase this patch so I can apply it? Sorry for the moving target, the merge window times are a bit bumpy. :/
Yours,
Linus Walleij
Kent Gibson
reviewerQuoted 18 lines · Linus Walleij
Quoted 7 lines · Kent Gibson
Split the cdev specific functionality out of
gpiolib.cand intogpiolib-cdev.c. This improves the readability and maintainability of both the cdev and core gpiolib code.Suggested-by Bartosz Golaszewski <[email protected]>Signed-off-by Kent Gibson <[email protected]>Quoted 8 lines
---
Changes in v3:
- updated thegpiolib-cdev.cfile comment.
- rebased to latest gpio/devel (no changes impacted this patch)
- dropped the patch commentary as the points mentioned are mostly resolved - there still remain a couple of commits in gpio/fixes that will conflict...
Quoted 5 lines
I rebased my GPIO tree on v5.8-rc1 and the old version of the patch did not apply and neither did this, could you rebase this patch so I can apply it? Sorry for the moving target, the merge window times are a bit bumpy. :/
No problem - I was expecting a rebase to be in that patch's future from the beginning.
Give v4 a try.
Cheers,
Kent.