From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: 2021-08-03 19:28:59
The same as for I²C Serial Bus resource split and export
serdev_acpi_get_uart_resource(). We have already 3 users
one of which is converted here.
Rationale of this is to consolidate parsing UART Serial Bus
resource in one place as it's done, e.g., for I²C Serial Bus.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/tty/serdev/core.c | 36 +++++++++++++++++++++++++++++-------
include/linux/serdev.h | 14 ++++++++++++++
2 files changed, 43 insertions(+), 7 deletions(-)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: 2021-08-03 19:29:03
serdev provides a generic helper to get UART Serial Bus resources.
Use it instead of open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/bluetooth/hci_bcm.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
From: Hans de Goede <hidden> Date: 2021-08-04 08:12:26
Hi,
On 8/3/21 9:29 PM, Andy Shevchenko wrote:
quoted hunk
serdev provides a generic helper to get UART Serial Bus resources.
Use it instead of open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/bluetooth/hci_bcm.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
You are replacing a nice switch-case which handles all relevant resource
types with still having a switch-case + a separate if .. else if .. else if ...
(also taking patch 4/5 into account).
This does not help the readability of this code at all IMHO, so NACK
from me for this patch as well as for 4/5.
Regards,
Hans
You are replacing a nice switch-case which handles all relevant resource
types with still having a switch-case + a separate if .. else if .. else if ...
(also taking patch 4/5 into account).
This does not help the readability of this code at all IMHO, so NACK
from me for this patch as well as for 4/5.
I guess it's a matter of style. The main idea is to try avoiding the
spreading of the customized ACPI resource extraction here and there.
Probably I should have started with cleaning up the EXTENDED_IRQ case,
which seems not needed here in the current form.
--
With Best Regards,
Andy Shevchenko
You are replacing a nice switch-case which handles all relevant resource
types with still having a switch-case + a separate if .. else if .. else if ...
(also taking patch 4/5 into account).
This does not help the readability of this code at all IMHO, so NACK
from me for this patch as well as for 4/5.
I guess it's a matter of style. The main idea is to try avoiding the
spreading of the customized ACPI resource extraction here and there.
I agree that the helpers make sense for drivers which care about 1
specific type of resource like an I2cSerialBus resource.
But in cases like this where the driver cares about all the resources
in the resource-list just doing a switch-case on the resource-type
directly in the driver just seems cleaner and it certainly is
easier to read. Helpers are nice, but every level of indirection
also means that a developer needs to go and find the function and
lookup what it does when they want to know what is exactly happening.
So lining up all these factors then just sticking with the
switch-case here seems best IMHO.
Also when there is doubt if a cleanup actually makes things
better, which there seems to be here, then it is best to simply
stick with what we have since every code-change may introduce
regressions, may make backporting fixes later more difficult, etc.
Regards,
Hans
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: 2021-08-03 19:29:13
serdev provides a generic helper to get UART Serial Bus resources.
Use it instead of open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/platform/surface/aggregator/core.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
From: Maximilian Luz <luzmaximilian@gmail.com> Date: 2021-08-03 19:47:17
On 8/3/21 9:29 PM, Andy Shevchenko wrote:
serdev provides a generic helper to get UART Serial Bus resources.
Use it instead of open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks! Looks good to me.
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: 2021-08-03 19:29:16
ACPI provides generic helpers to get GPIO interrupt and IO resources.
Use it instead of open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/bluetooth/hci_bcm.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
From: Hans de Goede <hidden> Date: 2021-08-04 08:04:58
Hi,
On 8/3/21 9:29 PM, Andy Shevchenko wrote:
ACPI provides generic helpers to get GPIO interrupt and IO resources.
Use it instead of open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
As explained in my reply to 3/5 this makes the code a lot harder
to read with little to no gain, so NACK from me for this one.
Regards,
Hans
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: 2021-08-03 19:29:17
Kernel doc validator complains about few missed parameter descriptions.
Fill the gap by describing them.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/bluetooth/hci_bcm.c | 6 ++++++
1 file changed, 6 insertions(+)
@@ -77,6 +78,8 @@ struct bcm_device_data {*@btlp:AppleACPImethodtotoggleBT_WAKEpin("Bluetooth Low Power")*@btpu:AppleACPImethodtodriveBT_REG_ONpinhigh("Bluetooth Power Up")*@btpd:AppleACPImethodtodriveBT_REG_ONpinlow("Bluetooth Power Down")+*@gpio_count:internalcounterforGPIOresourcesassociatedwithACPIdevice+*@gpio_int_idx:indexin_CRSforGpioInt()resource*@txco_clk:externalreferencefrequencyclockusedbyBluetoothdevice*@lpo_clk:externalLPOclockusedbyBluetoothdevice*@supplies:VBATandVDDIOsuppliesusedbyBluetoothdevice
@@ -88,10 +91,13 @@ struct bcm_device_data {*setto0if@init_speedisalreadythepreferredbaudrate*@irq:interrupttriggeredbyHOST_WAKE_BTpin*@irq_active_low:whether@irqisactivelow+*@irq_acquired:flagtoshowifIRQhandlerhasbeenassigned*@hu:pointertoHCIUARTcontrollerstruct,*usedtodisableflowcontrolduringruntimesuspendandsystemsleep*@is_suspended:whetherflowcontroliscurrentlydisabled*@no_early_set_baudrate:don'tset_baudratebeforesetup()+*@drive_rts_on_open:driveRTSsignalon->open()whenplatformrequiresit+*@pcm_int_params:keeptheinitialPCMconfiguration*/structbcm_device{/* Must be the first member, hci_serdev.c expects this. */
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: 2021-08-03 20:33:01
On Tue, Aug 03, 2021 at 01:04:18PM -0700, bluez.test.bot@gmail.com wrote:
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=525847
...
##############################
Test: TestRunner: smp-tester - FAIL - 2.09 seconds
Run test-runner with smp-tester
Total: 8, Passed: 7 (87.5%), Failed: 1, Not Run: 0
Failed Test Cases
SMP Client - SC Request 2 Failed 0.022 seconds
##############################
Test: TestRunner: userchan-tester - PASS - 1.95 seconds
Run test-runner with userchan-tester
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0
Hmm... I have read logs and I have no clue how my series may affect this. Any
BT expert here to shed a light?
--
With Best Regards,
Andy Shevchenko
From: Hans de Goede <hidden> Date: 2021-08-04 08:08:09
Hi,
On 8/3/21 9:29 PM, Andy Shevchenko wrote:
The same as for I²C Serial Bus resource split and export
serdev_acpi_get_uart_resource(). We have already 3 users
one of which is converted here.
Rationale of this is to consolidate parsing UART Serial Bus
resource in one place as it's done, e.g., for I²C Serial Bus.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <redacted>
*for this patch*
We do need to talk about how to merge this series, I've
NACK-ed patches 3/5 and 4/5 (see my reply there) so that
leaves just 2/5 as depending on this one. I believe it
would be easiest to just merge 1/5 + 2/5 to the tree
which caries serdev patches, which I guess is Greg's
tty tree ?
Greg can you pick up 1/5 and 2/5 ?
Regards,
Hans
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: 2021-08-04 12:07:26
On Wed, Aug 04, 2021 at 10:08:01AM +0200, Hans de Goede wrote:
Hi,
On 8/3/21 9:29 PM, Andy Shevchenko wrote:
quoted
The same as for I²C Serial Bus resource split and export
serdev_acpi_get_uart_resource(). We have already 3 users
one of which is converted here.
Rationale of this is to consolidate parsing UART Serial Bus
resource in one place as it's done, e.g., for I²C Serial Bus.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <redacted>
*for this patch*
We do need to talk about how to merge this series, I've
NACK-ed patches 3/5 and 4/5 (see my reply there) so that
leaves just 2/5 as depending on this one. I believe it
would be easiest to just merge 1/5 + 2/5 to the tree
which caries serdev patches, which I guess is Greg's
tty tree ?
I can resend a v2 with tags and dropped mentioned patches.
I think it will be easier to everyone to handle.
--
With Best Regards,
Andy Shevchenko