On 23/11/2022 11.24, Rob Herring wrote: > On Mon, Nov 21, 2022 at 08:42:26PM +0300, Sasha Finkelstein wrote: >> diff --git a/drivers/pwm/pwm-apple.c b/drivers/pwm/pwm-apple.c >> new file mode 100644 >> index 000000000000..b0c3f86fd578 >> --- /dev/null >> +++ b/drivers/pwm/pwm-apple.c >> @@ -0,0 +1,127 @@ >> +// SPDX-License-Identifier: GPL-2.0 OR MIT > > Kernel code is generally GPL-2.0 only. No other PWM driver is MIT > licensed. So why this one. > > Mixing licenses is a problem because few people look at the licenses > when copying code around. *Sigh*. We encourage the use of MIT dual-licensing as a project to allow other OSes to port the drivers over without having to rewrite them, for any driver written from scratch. We've had this conversation quite a few times already... >> + >> + ret = devm_pwmchip_add(&pdev->dev, &pwm->chip); > > This symbol is EXPORT_SYMBOL_GPL. So how can this module be MIT > licensed? Because they are compatible licenses. The combination of this driver and the kernel is GPL, but this driver itself is MIT. People are free to port it to other OSes and reimplement devm_pwmchip_add or replace the call with something else. The EXPORT_SYMBOL_GPL stuff is about blocking *proprietary* GPL-incompatible modules from using those symbols. This is a GPL-compatible, explicitly dual-licensed module. In this case the driver is trivial enough there isn't much to gain from dual-licensing since the parts that matter (the reverse engineering) are not copyrightable, but I still find it silly that we keep getting told more permissive licensing is a problem. People are free to dual-license their work as they see fit, it's a fundamental freedom in free software, and plenty of kernel code is dual-licensed like this (including much of DRM and entire GPU drivers). - Hector