Comments (11)
created PR
from linux_openvfd.
@lucky62 I don't have any devices that use the v6.7 kernel, so I can't make the following changes myself.
Looks like gpiochip_find
was deprecated and quickly replaced by gpio_device_find
. But this is a different method, and requires some extra code to get the gpio_chip
object from it.
You can see how this transition was handled in the linux kernel code:
https://elixir.bootlin.com/linux/v6.6.26/source/drivers/gpio/gpiolib.c#L1022
Maybe you can copy this whole method and paste in into the openvfd_drv.c file just above the get_chip_pin_number
method.
from linux_openvfd.
Something like this patch:
diff --git a/driver/openvfd_drv.c b/driver/openvfd_drv.c
index 7766740..f20f8d3 100644
--- a/driver/openvfd_drv.c
+++ b/driver/openvfd_drv.c
@@ -617,6 +617,24 @@ static int is_right_chip(struct gpio_chip *chip, void *data)
return 0;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0)
+static struct gpio_chip *gpiochip_find(void *data,
+ int (*match)(struct gpio_chip *gc,
+ void *data))
+{
+ struct gpio_device *gdev;
+ struct gpio_chip *gc = NULL;
+
+ gdev = gpio_device_find(data, match);
+ if (gdev) {
+ gc = gdev->chip;
+ gpio_device_put(gdev);
+ }
+
+ return gc;
+}
+#endif
+
static int get_chip_pin_number(const unsigned int gpio[])
{
int pin = -1;
Please let me know if it works, I'll merge it as a fix.
from linux_openvfd.
diff --git a/driver/openvfd_drv.c b/driver/openvfd_drv.c index 7766740..f20f8d3 100644 --- a/driver/openvfd_drv.c +++ b/driver/openvfd_drv.c @@ -617,6 +617,24 @@ static int is_right_chip(struct gpio_chip *chip, void *data) return 0; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0) +static struct gpio_chip *gpiochip_find(void *data, + int (*match)(struct gpio_chip *gc, + void *data)) +{ + struct gpio_device *gdev; + struct gpio_chip *gc = NULL; + + gdev = gpio_device_find(data, match); + if (gdev) { + gc = gdev->chip; + gpio_device_put(gdev); + } + + return gc; +} +#endif + static int get_chip_pin_number(const unsigned int gpio[]) { int pin = -1;
from linux_openvfd.
I add https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpiolib.h and include this. Its work!
from linux_openvfd.
Did you add it in addition to my proposed change or only that line?
Or better, can you post your diff or open a PR with the changes?
from linux_openvfd.
Same error. Waiting for accepting that PR.
from linux_openvfd.
Thanks for the PR, but I can't accept it as-is.
The driver is primarily targeted for CoreELEC, and the changes + additional files are not something that is required in this repo, at least at this stage.
I also think that "gpiolib.h" should not be part of the repository, and should be referenced directly against the platform the driver is built on, and the include is only required for the new kernels, so should be surrounded by #ifdef
.
When I get some free time, I will try to sort it out and post a patch for you to try.
from linux_openvfd.
Is there anything I can do to help? For example, provide SSH access to TV-box with 6.7.4 kernel for online testing?
from linux_openvfd.
Related Issues (20)
- Display something other then the time? HOT 4
- Warning and error while compiling driver HOT 5
- No display with HK1 Box On Armbian HOT 9
- OpenVFD: Failed to verify VFD config file, attempt using device tree HOT 25
- How to enter a port number greater than 255? HOT 9
- No LED indication on tanix tx6 android box HOT 6
- Kernel module name collision HOT 1
- Patch of_get_named_gpio_flags on latest kernels HOT 2
- License HOT 1
- OLED stays off when device comes out of suspend HOT 1
- Upstream into the kernel HOT 3
- What is the required file ? HOT 1
- RK3566 - "periphs-banks" chip not found (multiple banks issue, new $ARCH?) HOT 2
- Cannot paste vfd.conf into storage/config folder
- OpenVFD: Failed to verify VFD configuration file, attempt using device tree as fallback. HOT 3
- Q: How to compile? HOT 20
- Auto switch to wrong controller HOT 8
- Problems configuring X96 Air Q1000 VFD display HOT 43
- vfd.conf - correct pin numbers and Display Type setting HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linux_openvfd.