Re: [PATCH 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Felipe,

On Fri, Jun 27, 2014 at 8:59 AM, Felipe Balbi <balbi@xxxxxx> wrote:
>> I'll admit to not having been involved with the previous discussions,
>> but this seems strange to me.  Are we throwing in the towel and
>> deciding that it's too hard to get the Kconfigs right and that we'll
>> just rely on individual users to figure out the right answer for
>> themselves?
>
> no. select prevents a driver from be built as a dynamically linked
> module and distro-kernels might want to enable everything as modules.

Ah, that's what the problem was!  I wasn't aware of this issue with
SELECT.  Sorry for the noob-ness.

Really we want the PHY to be "=y" if the USB driver is "=y" or "=m" if
the USB driver is "=m", I think.  You could argue that one might want
to build the main USB driver into the kernel but have the phy drivers
as modules, so you could possibly also try to support that...

If there's not a good way to specify that, I guess we'll just have to
use "default" and rely on the user not to purposely choose the wrong
thing.  Like the following (untested):

config PHY_SAMSUNG_USB2
  depends on USB_OHCI_EXYNOS || USB_EHCI_EXYNOS
  default y if ARCH_EXYNOS=y && (USB_OHCI_EXYNOS=y || USB_EHCI_EXYNOS=y)
  default m if ARCH_EXYNOS=m && (USB_OHCI_EXYNOS=m || USB_EHCI_EXYNOS=m)
  ...

I see some syntax like that elsewhere in Kconfig so I assume it's reasonable...

With the above the user could purposely enable the OHCI or EHCI driver
and disable the PHY driver which is not really sensible.  ...but it
wouldn't cause a compile failure or crash--USB just won't work.

-Doug
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux