From: James Hogan <jhogan@kernel.org>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Huacai CHen <chenhc@lemote.com>,
linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/4] MIPS: Loongson64: Yeeloong add platform driver
Date: Wed, 24 Jan 2018 11:58:34 +0000 [thread overview]
Message-ID: <20180124115833.GC5446@saruman> (raw)
In-Reply-To: <20171226032602.11417-3-jiaxun.yang@flygoat.com>
[-- Attachment #1: Type: text/plain, Size: 2026 bytes --]
On Tue, Dec 26, 2017 at 11:26:00AM +0800, Jiaxun Yang wrote:
> diff --git a/drivers/platform/mips/yeeloong_laptop.c b/drivers/platform/mips/yeeloong_laptop.c
> new file mode 100755
Checkpatch complains about having the execute permission set on this
file.
> +static int __init yeeloong_init(void)
> +{
> + int ret;
> +
> + if (mips_machtype != MACH_LEMOTE_YL2F89) {
> + pr_err("Unsupported system.\n");
> + return -ENODEV;
> + }
> +
> + pr_info("Load YeeLoong Laptop Platform Specific Driver.\n");
> +
> + /* Register platform stuff */
> + ret = platform_driver_register(&platform_driver);
> + if (ret) {
> + pr_err("Fail to register yeeloong platform driver.\n");
> + return ret;
> + }
> +
> + ret = yeeloong_backlight_init();
> + if (ret) {
> + pr_err("Fail to register yeeloong backlight driver.\n");
> + yeeloong_backlight_exit();
> + return ret;
> + }
> +
> + ret = yeeloong_bat_init();
> + if (ret) {
> + pr_err("Fail to register yeeloong battery driver.\n");
> + yeeloong_bat_exit();
> + return ret;
> + }
> +
> + ret = yeeloong_hwmon_init();
> + if (ret) {
> + pr_err("Fail to register yeeloong hwmon driver.\n");
> + yeeloong_hwmon_exit();
> + return ret;
> + }
> +
> + ret = yeeloong_hotkey_init();
> + if (ret) {
> + pr_err("Fail to register yeeloong hotkey driver.\n");
> + yeeloong_hotkey_exit();
> + return ret;
> + }
> +
> + return 0;
> +}
> +
> +static void __exit yeeloong_exit(void)
> +{
> + yeeloong_hotkey_exit();
> + yeeloong_hwmon_exit();
> + yeeloong_bat_exit();
> + yeeloong_backlight_exit();
I can't help thinking it would be better to separate this into separate
drivers for each part (backlight, power supply etc), and move them into
the appropriate driver directories (drivers/power/supply,
drivers/video/backlight etc). That way each part would get proper review
from the appropriate maintainers (or at least they should be Cc'd).
Is there a particular reason for it to be a single driver?
Cheers
James
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-01-24 11:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-26 3:25 Add YeeLoong support v6 Jiaxun Yang
2017-12-26 3:25 ` [PATCH v6 1/4] MIPS: Loongson64: lemote-2f move ec_kb3310b.h to include dir and clean up Jiaxun Yang
2018-01-24 11:49 ` James Hogan
2017-12-26 3:26 ` [PATCH v6 2/4] MIPS: Loongson64: Yeeloong add platform driver Jiaxun Yang
2018-01-24 11:58 ` James Hogan [this message]
2017-12-26 3:26 ` [PATCH v6 3/4] MIPS: Loongson64: Load platform device during boot Jiaxun Yang
2018-01-24 13:18 ` James Hogan
2017-12-26 3:26 ` [PATCH v6 4/4] MAINTAINERS: Add entry for Lemote YeeLoong Extra Driver Jiaxun Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180124115833.GC5446@saruman \
--to=jhogan@kernel.org \
--cc=chenhc@lemote.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox