Received: by 10.223.176.46 with SMTP id f43csp650255wra; Wed, 24 Jan 2018 04:00:07 -0800 (PST) X-Google-Smtp-Source: AH8x227QbifUVaPRHsYPoQ7OK9dz2e1Rf/zMdBZjKZhykmrydQRT/84bWE0y68H3rCxLf12nahuP X-Received: by 2002:a17:902:868f:: with SMTP id g15-v6mr5423567plo.137.1516795206951; Wed, 24 Jan 2018 04:00:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516795206; cv=none; d=google.com; s=arc-20160816; b=KMe8WObyHo9qG1N3VixB1iy/87QZpGG9tFlLCcASoJgwqsws+oz5gSd6d4za4RJoDe EcFgHa+gFRANi/8RtE/yCUhRmWCK4RmJZEh6ktLvcacJlo5oxbdZ+GIfu+t1FfkpNizI 1cC/Ccb1HEGHV70wAl1SdPnqVR4tMnbdL3q4Ftxt60u2rWjwuuCBpjy4t8lVP1pMWxen GN+9PbLw02JS3Sde05C9LyaKs4wIWVmpqNT+lkMrkwFMQV5C7SNy4CgiOemzoK2hvV3y k2KuLk54B6xPIcbcAjvNL6KEB1jXEIn+/3DoOr2m8Qa92sW0ufUNHIuvHl1utaSBYKSe Q2JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=hhqZgVNYn8bPkSA34gO1OcytmPaxRHUwmtN1HClrWBo=; b=dBB8nPFrA1PKyLUncIwmfPsx6CwWjOVvhQZbTC1Vn+9bJoVV1Pps45EcrsCjOMRWAl Txnvk4JrkbX0KANUNWOXQhrOb8KI922gKpArTTCwKqx+Q2X54LsXq0OXffw+cAlbYEKE JnFl04swpPLrkNt+z1xv4UWaQsU+V7tLeq6y41I22V17dWqMJY+BZbeiG1lnBv2dDUDT NRXjhuG3wxT56RJx2Wq5aX408kBYoDkijmoffudjieCtqjwwBGZrijWxNIIEmPP9F33S VtfhDAsqa3nqnz626VLsyVIvJ/B9pqy+NfpOKeU5vLIKqdHizBO9xMkxy/JT1r0TIjlt AMgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e90-v6si91428plb.749.2018.01.24.03.59.52; Wed, 24 Jan 2018 04:00:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933441AbeAXL67 (ORCPT + 99 others); Wed, 24 Jan 2018 06:58:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:45524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933261AbeAXL66 (ORCPT ); Wed, 24 Jan 2018 06:58:58 -0500 Received: from saruman (jahogan.plus.com [212.159.75.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 011CB21778; Wed, 24 Jan 2018 11:58:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 011CB21778 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jhogan@kernel.org Date: Wed, 24 Jan 2018 11:58:34 +0000 From: James Hogan To: Jiaxun Yang Cc: Ralf Baechle , Huacai CHen , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 2/4] MIPS: Loongson64: Yeeloong add platform driver Message-ID: <20180124115833.GC5446@saruman> References: <20171226032602.11417-1-jiaxun.yang@flygoat.com> <20171226032602.11417-3-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ghzN8eJ9Qlbqn3iT" Content-Disposition: inline In-Reply-To: <20171226032602.11417-3-jiaxun.yang@flygoat.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ghzN8eJ9Qlbqn3iT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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/m= ips/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 !=3D MACH_LEMOTE_YL2F89) { > + pr_err("Unsupported system.\n"); > + return -ENODEV; > + } > + > + pr_info("Load YeeLoong Laptop Platform Specific Driver.\n"); > + > + /* Register platform stuff */ > + ret =3D platform_driver_register(&platform_driver); > + if (ret) { > + pr_err("Fail to register yeeloong platform driver.\n"); > + return ret; > + } > + > + ret =3D yeeloong_backlight_init(); > + if (ret) { > + pr_err("Fail to register yeeloong backlight driver.\n"); > + yeeloong_backlight_exit(); > + return ret; > + } > + > + ret =3D yeeloong_bat_init(); > + if (ret) { > + pr_err("Fail to register yeeloong battery driver.\n"); > + yeeloong_bat_exit(); > + return ret; > + } > + > + ret =3D yeeloong_hwmon_init(); > + if (ret) { > + pr_err("Fail to register yeeloong hwmon driver.\n"); > + yeeloong_hwmon_exit(); > + return ret; > + } > + > + ret =3D 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 =66rom 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 --ghzN8eJ9Qlbqn3iT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAlpodOkACgkQbAtpk944 dnoB9w//T+qJz5panBu4kxXfjC6aRQUMx2lhpR1zrBVMLfH9SaPGIDpGMVp2f+Ld NcCcf9qQq5Bw3jOOG4ZDL5vNeZ5UMVxb6co7jc+yyAC2NJfVsxwrGyUHgVrMaNqq Mma4VrshK9XhMmtOhLxnVg7+nLl3ghSJpAcwhT0l4xDnBiwsbv0/f85nzE1yWygQ fPK2q/t3l0zlFls7z/x5lscTNiT4kTw5hymkpSbvu166b6wlQqPIJotsHGbGntCh VQXwgBdcmDXW7dNNnu+ViVTsFu4HqzhZAjHlpqaQSvR83GTDmAUu0TNUZ1mjYkVH MaU9jP5aC3uMLNI+wzxGR/gab4amgOND5dNGJUI/rz6XluOUJs0985DB6g84uLFf 5VGD8pcpoy8dcIb9Wh021e9A9RXnIaYQkIYe7TFPB1aPOLlUzxiReVX25PZtk4P/ gNGgwEuhFib1ROoQkzrsalhzwLuzxb3m0R5tNYmpSWEYMFmDBVIpCx2TPlfhiJcz Mt5JoTmuHPILEgHBZeUCJbYRw0V8ZsthRMiC9Yy3q89YXfZzgmEgmYWHCp2xk6HA kGJz4EtC9iLcnnmV/SdYLXQzqfqKLPCYMGV14cqPLtKT8x9+lYMXQGB5JS2z8IiV +QZ8Kef3YQOu1dfj036mTXnYM/5H64b7g3natUgi+wJxqZr44H4= =VKaJ -----END PGP SIGNATURE----- --ghzN8eJ9Qlbqn3iT--