Received: by 10.223.176.46 with SMTP id f43csp740713wra; Wed, 24 Jan 2018 05:19:53 -0800 (PST) X-Google-Smtp-Source: AH8x227CH3lZgDbwcFJ/Z/cpGYk9Z5rxMB5U1fMFICOkJ5s5hFSRBvj8coUw6dty/WDy/vzkSA2T X-Received: by 10.99.96.199 with SMTP id u190mr10756502pgb.290.1516799993493; Wed, 24 Jan 2018 05:19:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516799993; cv=none; d=google.com; s=arc-20160816; b=XfnqK9EflYJZ0QSd4SXzwQLOmOU0sWlcBlPF4hkoiF6io/8LIlNrcARY7PTXVHYwYq B9Ju/FUHA657kEGY5h9AJOKfiCO0mJSD3gllav93JeVrmVbjN/pvxvRPWifwgqUQJOf8 VTs8aWNX9AqiOklq1yE3Exlmf77+1WMkrR60Qhngw+2mz3/bqqgOlDc3832j3qyN9Q3J 1NO37PcKbN28jjElLfOlb71H4eshHNyKY+8hVR1LFHT7qOyCXFaJfzUNY+lNG7F0Larx fGmEMuUUyL8N1sdUJcklglSTJpkF1q4AZtGZYaDxAd/2ufOekV2KXsmlFlipRWNkhZPO w6qg== 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=3LU1+jhR9U0Q8jD3p7K1b1qxwAju03jzSxP2dCIFx1E=; b=eNkMjLSZLl288Xq5WAtHYlOZsIPkSizna6rGGEwc8OfBIMmDQfgqqDLPT5yIQxxp5R z7Ps3OpwTIImU+s6uadfskZK3LxpmhpAMCx+sJZYsBmvYfJicikkemTrjorNdHJkI42f NX+HXcLmVbEJVgo+wnozR0/RrYj7sncjTwydNQ346dow9TOdWbJhe2/2CvHO5Q9UdlhG G5x6XvQPsK/By1l9/AXaS9M8c1H1IpWDjAMNJM9UiWCWLdzuHGgvuG5a49xzyKtdeclS UnIMrA7gv6bUm58JxuJcMFBDsu5xBCFmLzEGljdSHMJdJBbztpgOQc4yoiiTy7+9gyp8 upuw== 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 e11-v6si176538plo.556.2018.01.24.05.19.39; Wed, 24 Jan 2018 05:19:53 -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 S933647AbeAXNTP (ORCPT + 99 others); Wed, 24 Jan 2018 08:19:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:54198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933462AbeAXNTO (ORCPT ); Wed, 24 Jan 2018 08:19:14 -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 EBF0020B80; Wed, 24 Jan 2018 13:19:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBF0020B80 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 13:18:49 +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 3/4] MIPS: Loongson64: Load platform device during boot Message-ID: <20180124131848.GD5446@saruman> References: <20171226032602.11417-1-jiaxun.yang@flygoat.com> <20171226032602.11417-4-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AkbCVLjbJ9qUtAXD" Content-Disposition: inline In-Reply-To: <20171226032602.11417-4-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 --AkbCVLjbJ9qUtAXD Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 26, 2017 at 11:26:01AM +0800, Jiaxun Yang wrote: > This patch just add pdev during boot to load the platform driver >=20 > Signed-off-by: Jiaxun Yang > --- > arch/mips/loongson64/lemote-2f/Makefile | 2 +- > arch/mips/loongson64/lemote-2f/platform.c | 25 +++++++++++++++++++++++++ > 2 files changed, 26 insertions(+), 1 deletion(-) > create mode 100644 arch/mips/loongson64/lemote-2f/platform.c >=20 > diff --git a/arch/mips/loongson64/lemote-2f/Makefile b/arch/mips/loongson= 64/lemote-2f/Makefile > index 08b8abcbfef5..31c90737b98c 100644 > --- a/arch/mips/loongson64/lemote-2f/Makefile > +++ b/arch/mips/loongson64/lemote-2f/Makefile > @@ -2,7 +2,7 @@ > # Makefile for lemote loongson2f family machines > # > =20 > -obj-y +=3D clock.o machtype.o irq.o reset.o ec_kb3310b.o > +obj-y +=3D clock.o machtype.o irq.o reset.o ec_kb3310b.o platform.o > =20 > # > # Suspend Support > diff --git a/arch/mips/loongson64/lemote-2f/platform.c b/arch/mips/loongs= on64/lemote-2f/platform.c > new file mode 100644 > index 000000000000..e0007f6c456a > --- /dev/null > +++ b/arch/mips/loongson64/lemote-2f/platform.c > @@ -0,0 +1,25 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/*=20 Trailing whitespace > +* Copyright (C) 2017 Jiaxun Yang > +* > +*/ Checkpatch complains about missing spaces to align the '*' on each line of this block comment. Cheers James > + > +#include > +#include > + > +#include > + > +static struct platform_device yeeloong_pdev =3D { > + .name =3D "yeeloong_laptop", > + .id =3D -1, > +}; > + > +static int __init lemote2f_platform_init(void) > +{ > + if (mips_machtype !=3D MACH_LEMOTE_YL2F89) > + return -ENODEV; > + > + return platform_device_register(&yeeloong_pdev); > +} > + > +arch_initcall(lemote2f_platform_init); > --=20 > 2.15.1 >=20 --AkbCVLjbJ9qUtAXD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAlpoh7IACgkQbAtpk944 dnq8NA/+OfLE3rYTZuiHGYcabBMAXWLaoBZzCHH5mXtkLB93f+yRS2hl3blKSD/8 wNPmxcoHgIchI8LfJDNnPEkaKp7sb+5OX/NcuyryMP80HQn0H5t/j+MGUSwIhCh8 179DNk1ZHJN0VrOYrggHrormhPz6Kw/SpJzHamoN4g33aTj512pokhRjz6DFnR2X sN1lMdEeZvgjSRqagkyQ9QPdy7FD7Bqvs6BC4YnltPFlcLhjuixAYP4W1E40TVEU +vt8i5p8VfswRL+XlQrIXdntM/YHw4gs75hGUmASLCwGazRQY7bqlFz9fNlwuPH5 kQb52goBT3ri2+QDbSwPF1NARf3hB2H9LTrjaadjY7GPM6l1LLjdD2zE0dPplNeI /KMmuxUyVKd4hkodprmOl2GPw8YhZzTHqRgjMrT13om37v5s/aNVHdSWk71pm529 BjKlOv4S8Fqy1fc8Fz1EtlX6SZsbE6FNPRdnbvGfNGylIP7RpHmfoU6oS4fWr/bv CVooxtbrnoO5CJleTZqh5JwH29+rDCOMG0N9YoemW4GIRN8JAkujmaQvcpLlUclF s1KhjzoqEu338i8Zg+gVBgVEr/I1DsUtLaTu+NuMfj8zbPPOj7NSGNDdCvSsiggH 1XxBIUY2L017tJDxkxWjiEOjR10xq6thISngqZSCu9qi66IiCPY= =7gFH -----END PGP SIGNATURE----- --AkbCVLjbJ9qUtAXD--