Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-21 Thread Jeremy Cline
On 02/20/2018 04:34 PM, Carlo Caione wrote:
> On Tue, Feb 20, 2018 at 9:18 PM, Jeremy Cline  wrote:
> 
>> Great, thanks for all the info! I'll definitely keep you CC'ed on my
>> progress. I'm still very new to kernel development so I expect it'll
>> take me quite a while, but I do have a fair bit of time to devote to
>> this.
> 
> Welcome to this crazy world ;)

Thanks!

> Keep me on CC also, I have quite a bit of hw I can test the patches
> on. Fell free also to reach me in private.
> I was actually going to work on this myself but now I guess there are
> too many people.

Will do. As for too many people, that's a pretty good problem to have!
It sounds like Martin is pretty busy, though, and I would welcome your
help. I was going to start by rebasing the current RFC and then looking
at adding ACPI support since that sounds pretty straight-forward and I
have the hardware.

Figuring out the mysteries of the config blob and creating an H5
"library" sound fairly independent to me so if you're interested maybe
we could both take one on.

Regards,
Jeremy


Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-21 Thread Marcel Holtmann
Hi Carlo,

>> Great, thanks for all the info! I'll definitely keep you CC'ed on my
>> progress. I'm still very new to kernel development so I expect it'll
>> take me quite a while, but I do have a fair bit of time to devote to
>> this.
> 
> Welcome to this crazy world ;)
> Keep me on CC also, I have quite a bit of hw I can test the patches
> on. Fell free also to reach me in private.
> I was actually going to work on this myself but now I guess there are
> too many people.

I doubt there are too many people. I think there is a good baseline that needs 
some love to finish.

Regards

Marcel



Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-21 Thread Marcel Holtmann
Hi Martin,

 Is this for devices with a RTL8723BS chip? If so then they
 still will not work after this since there also no longer is
 a /dev/ttyS4 created for the UART for the bluetooth, instead
 you probably want:
 
 
 https://github.com/jwrdegoede/linux-sunxi/commit/c383dac5ea00738ac01d704d820aa548494fcd41
 
 Which also puts the /dev/ttyS4 back in place.
>>> 
>>> 
>>> Yeah, this problem came up while working on the RTL8723BS chip but the
>>> driver is also broken for the other two GPS devices supported by this
>>> driver.
>>> Thank you for the patch BTW.
>>> 
 Regards,
 
 Hans
 
 p.s.
 
 My college Jeremy Cline in the Cc is looking into getting proper
 bluetooth support in place for the rtl8723bs using serdev binding
 and having everything in the kernel, as we now already do for bcm
 uart bluetooth modules.
>>> 
>>> 
>>> Wasn't also Martin (+CC) working on this? See
>>> https://www.spinics.net/lists/linux-bluetooth/msg73594.html
> thank you for CC'ing me Carlo!
> 
>> Ah I did not know that, cool.  Jeremy, this is probably a good starting
>> point :)   And you should probably coordinate with Martin on this.
> the status on this is:
> - Marcel wrote a tool to parse the config blob: [0]
> - the first patch from my series called "serdev: implement parity
> configuration" is now obsolete because an improved version from Ulrich
> Hecht has been merged: [1] (this requires a trivial change to the
> "serdev_device_set_parity" call in patch #9 of my series)
> - I still have Realtek serdev support on my TODO-list but with low priority
> 
> there was a discussion what has to be done to drop the "RFC" prefix
> from my series: [3]
> the quick summary (from my point of view):
> - if possible we should get rid of the config blob (don't use it at
> all or generate it in-memory - I couldn't make either of these work so
> far but I've not spent much time on it either)

so I have no idea what the config blobs are actually doing. However I am afraid 
they are needed since they are changing setting that should have been in the 
ROM mask, but they aren’t. What would be interesting to find the vendor command 
to read out the memory area and match it to the config file.

> - create a "library" for the H5 protocol (similar to the H4 protocol)
> so the Realtek code doesn't have to be part of hci_h5.c

I would prefer to have that from the beginning, but I would accept incremental 
patches once Realtek support is merged.

> - add ACPI support (and not just device-tree support)

That should be as simple as just adding the PNPIDs to the driver.

> - testing with existing Realtek USB devices is needed
> 
> I have successfully tested v2 of my series on two Amlogic boards I
> have which both come with a RTL8723BS SDIO wifi/UART Bluetooth combo
> chip.
> that said, I only looked at Bluetooth support (I didn't test wifi or
> btcoex support) and I don't have any "Realtek USB Bluetooth" dongles
> to check that I didn't break support for the existing devices
> 
> @Jeremy: I definitely won't be able to update my patches for the v4.17
> cycle (and I'm not sure how much time I can dedicate to this for the
> v4.18 cycle).
> it would be great if you could keep me CC'ed on your patches so I can
> learn and test them on the boards I have

Regards

Marcel



Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-20 Thread Carlo Caione
On Tue, Feb 20, 2018 at 9:18 PM, Jeremy Cline  wrote:

> Great, thanks for all the info! I'll definitely keep you CC'ed on my
> progress. I'm still very new to kernel development so I expect it'll
> take me quite a while, but I do have a fair bit of time to devote to
> this.

Welcome to this crazy world ;)
Keep me on CC also, I have quite a bit of hw I can test the patches
on. Fell free also to reach me in private.
I was actually going to work on this myself but now I guess there are
too many people.

Cheers,

-- 
Carlo Caione  |  +44.7384.69.16.04  |  Endless


Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-20 Thread Jeremy Cline
Hi Martin,

On 02/20/2018 03:26 PM, Martin Blumenstingl wrote:
> Hello Jeremy, Hello Hans,
> 
> On Tue, Feb 20, 2018 at 5:15 PM, Hans de Goede  wrote:
>> Hi,
>>
>> On 02/20/2018 03:36 PM, Carlo Caione wrote:
>>>
>>> On Tue, Feb 20, 2018 at 2:01 PM, Hans de Goede 
>>> wrote:

 Hi Carlo,
>>>
>>>
>>> Hi Hans,
>>>
 Is this for devices with a RTL8723BS chip? If so then they
 still will not work after this since there also no longer is
 a /dev/ttyS4 created for the UART for the bluetooth, instead
 you probably want:


 https://github.com/jwrdegoede/linux-sunxi/commit/c383dac5ea00738ac01d704d820aa548494fcd41

 Which also puts the /dev/ttyS4 back in place.
>>>
>>>
>>> Yeah, this problem came up while working on the RTL8723BS chip but the
>>> driver is also broken for the other two GPS devices supported by this
>>> driver.
>>> Thank you for the patch BTW.
>>>
 Regards,

 Hans

 p.s.

 My college Jeremy Cline in the Cc is looking into getting proper
 bluetooth support in place for the rtl8723bs using serdev binding
 and having everything in the kernel, as we now already do for bcm
 uart bluetooth modules.
>>>
>>>
>>> Wasn't also Martin (+CC) working on this? See
>>> https://www.spinics.net/lists/linux-bluetooth/msg73594.html
> thank you for CC'ing me Carlo!
> 
>> Ah I did not know that, cool.  Jeremy, this is probably a good starting
>> point :)   And you should probably coordinate with Martin on this.
> the status on this is:
> - Marcel wrote a tool to parse the config blob: [0]
> - the first patch from my series called "serdev: implement parity
> configuration" is now obsolete because an improved version from Ulrich
> Hecht has been merged: [1] (this requires a trivial change to the
> "serdev_device_set_parity" call in patch #9 of my series)
> - I still have Realtek serdev support on my TODO-list but with low priority
> 
> there was a discussion what has to be done to drop the "RFC" prefix
> from my series: [3]
> the quick summary (from my point of view):
> - if possible we should get rid of the config blob (don't use it at
> all or generate it in-memory - I couldn't make either of these work so
> far but I've not spent much time on it either)
> - create a "library" for the H5 protocol (similar to the H4 protocol)
> so the Realtek code doesn't have to be part of hci_h5.c
> - add ACPI support (and not just device-tree support)
> - testing with existing Realtek USB devices is needed
> 
> I have successfully tested v2 of my series on two Amlogic boards I
> have which both come with a RTL8723BS SDIO wifi/UART Bluetooth combo
> chip.
> that said, I only looked at Bluetooth support (I didn't test wifi or
> btcoex support) and I don't have any "Realtek USB Bluetooth" dongles
> to check that I didn't break support for the existing devices
> 
> @Jeremy: I definitely won't be able to update my patches for the v4.17
> cycle (and I'm not sure how much time I can dedicate to this for the
> v4.18 cycle).
> it would be great if you could keep me CC'ed on your patches so I can
> learn and test them on the boards I have

Great, thanks for all the info! I'll definitely keep you CC'ed on my
progress. I'm still very new to kernel development so I expect it'll
take me quite a while, but I do have a fair bit of time to devote to
this.


Regards,
Jeremy


Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-20 Thread Martin Blumenstingl
Hello Jeremy, Hello Hans,

On Tue, Feb 20, 2018 at 5:15 PM, Hans de Goede  wrote:
> Hi,
>
> On 02/20/2018 03:36 PM, Carlo Caione wrote:
>>
>> On Tue, Feb 20, 2018 at 2:01 PM, Hans de Goede 
>> wrote:
>>>
>>> Hi Carlo,
>>
>>
>> Hi Hans,
>>
>>> Is this for devices with a RTL8723BS chip? If so then they
>>> still will not work after this since there also no longer is
>>> a /dev/ttyS4 created for the UART for the bluetooth, instead
>>> you probably want:
>>>
>>>
>>> https://github.com/jwrdegoede/linux-sunxi/commit/c383dac5ea00738ac01d704d820aa548494fcd41
>>>
>>> Which also puts the /dev/ttyS4 back in place.
>>
>>
>> Yeah, this problem came up while working on the RTL8723BS chip but the
>> driver is also broken for the other two GPS devices supported by this
>> driver.
>> Thank you for the patch BTW.
>>
>>> Regards,
>>>
>>> Hans
>>>
>>> p.s.
>>>
>>> My college Jeremy Cline in the Cc is looking into getting proper
>>> bluetooth support in place for the rtl8723bs using serdev binding
>>> and having everything in the kernel, as we now already do for bcm
>>> uart bluetooth modules.
>>
>>
>> Wasn't also Martin (+CC) working on this? See
>> https://www.spinics.net/lists/linux-bluetooth/msg73594.html
thank you for CC'ing me Carlo!

> Ah I did not know that, cool.  Jeremy, this is probably a good starting
> point :)   And you should probably coordinate with Martin on this.
the status on this is:
- Marcel wrote a tool to parse the config blob: [0]
- the first patch from my series called "serdev: implement parity
configuration" is now obsolete because an improved version from Ulrich
Hecht has been merged: [1] (this requires a trivial change to the
"serdev_device_set_parity" call in patch #9 of my series)
- I still have Realtek serdev support on my TODO-list but with low priority

there was a discussion what has to be done to drop the "RFC" prefix
from my series: [3]
the quick summary (from my point of view):
- if possible we should get rid of the config blob (don't use it at
all or generate it in-memory - I couldn't make either of these work so
far but I've not spent much time on it either)
- create a "library" for the H5 protocol (similar to the H4 protocol)
so the Realtek code doesn't have to be part of hci_h5.c
- add ACPI support (and not just device-tree support)
- testing with existing Realtek USB devices is needed

I have successfully tested v2 of my series on two Amlogic boards I
have which both come with a RTL8723BS SDIO wifi/UART Bluetooth combo
chip.
that said, I only looked at Bluetooth support (I didn't test wifi or
btcoex support) and I don't have any "Realtek USB Bluetooth" dongles
to check that I didn't break support for the existing devices

@Jeremy: I definitely won't be able to update my patches for the v4.17
cycle (and I'm not sure how much time I can dedicate to this for the
v4.18 cycle).
it would be great if you could keep me CC'ed on your patches so I can
learn and test them on the boards I have


Regards
Martin


[0] 
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/tools/rtlfw.c?id=8b21a74f2e473b88cadc8ad871c635ace969ee02
[1] 
https://github.com/torvalds/linux/commit/3a19cfcce105e481b02b14265c5b40c6c10ef60a
[2] https://www.spinics.net/lists/linux-bluetooth/msg73602.html
[3] https://www.spinics.net/lists/linux-bluetooth/msg73602.html


Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-20 Thread Hans de Goede

Hi,

On 02/20/2018 03:36 PM, Carlo Caione wrote:

On Tue, Feb 20, 2018 at 2:01 PM, Hans de Goede  wrote:

Hi Carlo,


Hi Hans,


Is this for devices with a RTL8723BS chip? If so then they
still will not work after this since there also no longer is
a /dev/ttyS4 created for the UART for the bluetooth, instead
you probably want:

https://github.com/jwrdegoede/linux-sunxi/commit/c383dac5ea00738ac01d704d820aa548494fcd41

Which also puts the /dev/ttyS4 back in place.


Yeah, this problem came up while working on the RTL8723BS chip but the
driver is also broken for the other two GPS devices supported by this
driver.
Thank you for the patch BTW.


Regards,

Hans

p.s.

My college Jeremy Cline in the Cc is looking into getting proper
bluetooth support in place for the rtl8723bs using serdev binding
and having everything in the kernel, as we now already do for bcm
uart bluetooth modules.


Wasn't also Martin (+CC) working on this? See
https://www.spinics.net/lists/linux-bluetooth/msg73594.html


Ah I did not know that, cool.  Jeremy, this is probably a good starting
point :)   And you should probably coordinate with Martin on this.

Regards,

Hans


Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-20 Thread Marcel Holtmann
Hi Carlo,

>> Is this for devices with a RTL8723BS chip? If so then they
>> still will not work after this since there also no longer is
>> a /dev/ttyS4 created for the UART for the bluetooth, instead
>> you probably want:
>> 
>> https://github.com/jwrdegoede/linux-sunxi/commit/c383dac5ea00738ac01d704d820aa548494fcd41
>> 
>> Which also puts the /dev/ttyS4 back in place.
> 
> Yeah, this problem came up while working on the RTL8723BS chip but the
> driver is also broken for the other two GPS devices supported by this
> driver.
> Thank you for the patch BTW.
> 
>> Regards,
>> 
>> Hans
>> 
>> p.s.
>> 
>> My college Jeremy Cline in the Cc is looking into getting proper
>> bluetooth support in place for the rtl8723bs using serdev binding
>> and having everything in the kernel, as we now already do for bcm
>> uart bluetooth modules.
> 
> Wasn't also Martin (+CC) working on this? See
> https://www.spinics.net/lists/linux-bluetooth/msg73594.html

I remember that. I think we need a non-RFC version against latest 
bluetooth-next tree.

Regards

Marcel



Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-20 Thread Carlo Caione
On Tue, Feb 20, 2018 at 2:01 PM, Hans de Goede  wrote:
> Hi Carlo,

Hi Hans,

> Is this for devices with a RTL8723BS chip? If so then they
> still will not work after this since there also no longer is
> a /dev/ttyS4 created for the UART for the bluetooth, instead
> you probably want:
>
> https://github.com/jwrdegoede/linux-sunxi/commit/c383dac5ea00738ac01d704d820aa548494fcd41
>
> Which also puts the /dev/ttyS4 back in place.

Yeah, this problem came up while working on the RTL8723BS chip but the
driver is also broken for the other two GPS devices supported by this
driver.
Thank you for the patch BTW.

> Regards,
>
> Hans
>
> p.s.
>
> My college Jeremy Cline in the Cc is looking into getting proper
> bluetooth support in place for the rtl8723bs using serdev binding
> and having everything in the kernel, as we now already do for bcm
> uart bluetooth modules.

Wasn't also Martin (+CC) working on this? See
https://www.spinics.net/lists/linux-bluetooth/msg73594.html

Cheers,

-- 
Carlo Caione  |  +44.7384.69.16.04  |  Endless


Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-20 Thread Marcel Holtmann
Hi Hans,

> Is this for devices with a RTL8723BS chip? If so then they
> still will not work after this since there also no longer is
> a /dev/ttyS4 created for the UART for the bluetooth, instead
> you probably want:
> 

it is not for that hardware, it is for some GPS devices.

static const struct acpi_device_id rfkill_acpi_match[] = {
{ "BCM4752", RFKILL_TYPE_GPS },
{ "LNV4752", RFKILL_TYPE_GPS },
{ },
};

> https://github.com/jwrdegoede/linux-sunxi/commit/c383dac5ea00738ac01d704d820aa548494fcd41
> 
> Which also puts the /dev/ttyS4 back in place.
> 
> Regards,
> 
> Hans
> 
> p.s.
> 
> My college Jeremy Cline in the Cc is looking into getting proper
> bluetooth support in place for the rtl8723bs using serdev binding
> and having everything in the kernel, as we now already do for bcm
> uart bluetooth modules.

Actually this should be done quickly since the Realtek hciattach / btattach 
hacks are not even upstream either since that is unmergable code. Even a basic 
hci_rtl.c driver would be better than nothing.

Regards

Marcel



Re: [RFC PATCH 0/2] net: rfkill: gpio: Fix and support SerDev

2018-02-20 Thread Hans de Goede

Hi Carlo,

Is this for devices with a RTL8723BS chip? If so then they
still will not work after this since there also no longer is
a /dev/ttyS4 created for the UART for the bluetooth, instead
you probably want:

https://github.com/jwrdegoede/linux-sunxi/commit/c383dac5ea00738ac01d704d820aa548494fcd41

Which also puts the /dev/ttyS4 back in place.

Regards,

Hans

p.s.

My college Jeremy Cline in the Cc is looking into getting proper
bluetooth support in place for the rtl8723bs using serdev binding
and having everything in the kernel, as we now already do for bcm
uart bluetooth modules.

On 20-02-18 14:46, Carlo Caione wrote:

From: Carlo Caione 

Hi,
this patch came after investigating why the rfkill-gpio driver was failing on
the latest kernel on a machine I have. Sending this out as RFC because I'm
still not sure if this is the right way to approach this problem. I was
honestly expecting not to see the platform devices failing as consequences of
the latest work on SerDev.

Carlo Caione (2):
   net: rfkill: gpio: Fix NULL pointer deference
   net: rfkill: gpio: Convert driver to SerDev

  net/rfkill/Kconfig   |  1 +
  net/rfkill/rfkill-gpio.c | 48 +---
  2 files changed, 26 insertions(+), 23 deletions(-)