From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C673E35E925 for ; Thu, 9 Jul 2026 07:02:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.128.175 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783580553; cv=pass; b=aaF3sbDrSfxJgrbrhP9J8guAArymK3O0YRyST4jdbR4jzKxzRhvNnrufRPYqh0MkRkMCXX4cxD6GZJOsVblwLh+kxLtMO//R1u1CvefWqzXroU80kRWZ+m6y4ApgmkkQ6XTtTOhpbBcOiPsr7UHLlzM3/Bbzn5cPqe542TjjIbM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783580553; c=relaxed/simple; bh=uD6Osf6Z82OsRPDVnF3a4ym/ndZXwELdg64JuzBVz90=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=QHqCm4R1jcVFfdhOUnmxkW4S55D1HLkrHS4+H4tiRf6x+3nS+DFu2JVLrfan5bGpRTFMdP18cUl/J8R7RavZrHz+GV4fZoM7fZ04piaPOEeHqZsSxRPQozr6i6DkFvjprqWHHoI/gDdnA0DsWIHBYJhtP/JRiPtHrwPuaTyuos8= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=WVIIl3yk; arc=pass smtp.client-ip=209.85.128.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="WVIIl3yk" Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-81d152c1c39so6939317b3.2 for ; Thu, 09 Jul 2026 00:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783580551; cv=none; d=google.com; s=arc-20260327; b=gWRD66i7uhb0tbIAzgknQBz9h4RlwAv1pGt8dlrzi6HBZjxSP7zPJP8eBxlT9p5NAn DSaNQXW8L3x19Dv8Qsd91uvxp0YTPIlHR5CIS53UYmQDvJrosGvBApbYcjlXWkIDPnWN Hh+vomsigTfEAS6QCKvuK19LAyb7zpU62H3vgd64dL5TvyFvxH9ZEOsPBZh/9N+hDSkl UY4fFSnfCqJ7lzRgj1kkGcjbSkTGgZEJr7ziXOuRCSo1Spt+So7vtHGcBWVDZlve7w45 rjCIUYF3I+zZDHGpuiec2FV8JJVuOE1A4vbQIJRL0bsTJxWfDUwokcj8+YTEQOU+eI5v vdOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uD6Osf6Z82OsRPDVnF3a4ym/ndZXwELdg64JuzBVz90=; fh=LP9cALOSCx/PHGzGlFAgxqICjLltKjhpPVyB8qt8kTA=; b=YNwtOpijJUP3ra95nZaCc0cGHjiCQTgyghSjnWrdiJZ/zwTuxK/jHWoq7l5Nvia8WW bCZxIYJ3tdX1k4nN6kgTdd8xgSM/TGbLwyz4ifG2We4FdEc5K1wE7JmXH44nkhHIGc2j /gNzaGBcFKUMxA+qM0+JmEXZkY4m2Lq54aJlJYcLzUMXQS91nYPbC1//0WRILYMarCwx Oi7EVIRvT7v16Q3eZgg4SbhMKL+8oOBtibGafNKPQlWKDf0rz77zYYSxPcKriB6/7jZ0 a/4MnvWSMWnRIivmw7QRMvWga1RCGBHOFTXKoRYsii4OrxcaUAvTAwoJcywxu066cSAQ lBLA==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1783580551; x=1784185351; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:from:to:cc:subject :date:message-id:reply-to:content-type; bh=uD6Osf6Z82OsRPDVnF3a4ym/ndZXwELdg64JuzBVz90=; b=WVIIl3yk+VbV30oHmqXf1jD9Aaaar4oyWQNHozfaCam7YXMVmdcWExpEptsR4R9Zt3 rfRJz9Qmhg4gBiZ2kYayh8hbOjNJpQox+JHyCGxoJgqJcMS4Hzhiz+U0cr9j0IcesNCY vgbz+w2F9sw1wWbXim5OMz12p8rHvuSJg+IkE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783580551; x=1784185351; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=uD6Osf6Z82OsRPDVnF3a4ym/ndZXwELdg64JuzBVz90=; b=k1/mf+s52zxUj7f3KuVyOJ+rzV1BrQiUMQPCzcih5N0gOWRceQx0f3J9kKbOySgH4x 8BDAep6uY191EHQOaDr2FlnJ4lribd0c+m+9YsORzhuGh2XlGIgNwxZOefdcZzjfkgS1 QRgr6AgwEkseWZm/0n0fQ/UFTSY5fZEInNvi+jBCXRK2nh++SxwPcN5qFF+ZuxSFR1zI xRuqRfERxxKV7p8daVcUhBKNPfJ2cfXlLBvCxiLA00m1bSHeo09xnT1GkOPIFYQ+PUcG rdL2JjCzChaEBBxPImorOuB0EUIUGAJvNRWZI4TedkxoJACH493YOAl4GRX4/sGGTW6J mVXA== X-Forwarded-Encrypted: i=1; AHgh+Rptp/66gBr/7JSOZ30K90sJQtnFD7Olizr+EQ/MwkKNJyegmHcwNJAobDCsDWsyjr/p/B8fOihTmBvJe9M=@vger.kernel.org X-Gm-Message-State: AOJu0YzB/XU36R+PLWeY1giJbzNvJA3gxHTXoRMlDEHpFOzKVVTkpNVY c/fP2WAf/QGZndBblgNieqnKRT4JeohhK8xAed46xgLi5XZfCBUwrdeOu7rFEpvvNwTBEVnNAVw FKdguZa9yiJ47ZlT+1VKgxdxxKyTyCX3Ic/csAgjX X-Gm-Gg: AfdE7cmFfojXCCKKwxQnqqCOHo80Db5ftoIKmKtLZoWURIwguzRUP7+UVtgGzovighW omV1pYnu9QnB+2jUE9UrVz4xDRkpZKrT/1L49d9KNIVc35+EXHGB9hqbO8LOBiM5oKgI06KhSp6 5qtW2ES4/m/JnLnxVo6QiLrlTjET2+CIFoBGlZjjc7D7zUKGwTt0wDCJORjkGW7QN0x0RWIw26L KduxX9gjTMJU5s/nbBBj2dJEjDf3FaQk7aMbOYPdl/EpZlyTjO5iQqD3qq7iOU0NVOFtY4jpiIW thuwgSRIGseN0aT8OUIW37TXQM1pmK1VVJ+gdg== X-Received: by 2002:a53:cf41:0:b0:667:8b91:2436 with SMTP id 956f58d0204a3-6679f2660e4mr3536586d50.101.1783580550797; Thu, 09 Jul 2026 00:02:30 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260709063450.1615041-1-justin.yeh@mediatek.com> <20260709063450.1615041-4-justin.yeh@mediatek.com> In-Reply-To: <20260709063450.1615041-4-justin.yeh@mediatek.com> From: Chen-Yu Tsai Date: Thu, 9 Jul 2026 15:02:20 +0800 X-Gm-Features: AVVi8Cc-6951WW98xAGZ6jiAvP0W_Uwp4fM0w9OTetzj576Smn-XC53Uyv0aJbs Message-ID: Subject: Re: [PATCH v5 3/4] pinctrl: mediatek: mt7986: register both platform drivers from a single initcall To: Justin Yeh Cc: Sean Wang , Linus Walleij , Matthias Brugger , AngeloGioacchino Del Regno , Project_Global_Chrome_Upstream_Group@mediatek.com, linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jul 9, 2026 at 2:35=E2=80=AFPM Justin Yeh = wrote: > > The MT7986 driver registers two separate platform drivers (mt7986a and > mt7986b) and used to call arch_initcall() twice, once for each. > > This is fine while the driver is built-in, but a single translation unit > can only provide one module_init(). Since arch_initcall() expands to > module_init() when built as a module, having two of them would break the > module build with a redefinition of init_module()/__inittest(). > > Fold both platform drivers into a single driver array and register them > from one initcall using platform_register_drivers(), matching the shape o= f > the other MediaTek pinctrl SoC drivers. platform_register_drivers() also > rolls back the first registration if the second one fails. > > No functional change for built-in builds; this is a preparatory cleanup > for enabling module builds. > > Signed-off-by: Justin Yeh Reviewed-by: Chen-Yu Tsai