{"id":2232292,"url":"http://patchwork.ozlabs.org/api/patches/2232292/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pwm/patch/20260504085535.1914668-2-u.kleine-koenig@baylibre.com/","project":{"id":38,"url":"http://patchwork.ozlabs.org/api/projects/38/?format=json","name":"Linux PWM development","link_name":"linux-pwm","list_id":"linux-pwm.vger.kernel.org","list_email":"linux-pwm@vger.kernel.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260504085535.1914668-2-u.kleine-koenig@baylibre.com>","list_archive_url":null,"date":"2026-05-04T08:55:35","name":"pwm: Consistently define pci_device_ids using named initializers","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"417a35de13200320652cc326392391aba7a6e325","submitter":{"id":88686,"url":"http://patchwork.ozlabs.org/api/people/88686/?format=json","name":"Uwe Kleine-König (The Capable Hub)","email":"u.kleine-koenig@baylibre.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-pwm/patch/20260504085535.1914668-2-u.kleine-koenig@baylibre.com/mbox/","series":[{"id":502627,"url":"http://patchwork.ozlabs.org/api/series/502627/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pwm/list/?series=502627","date":"2026-05-04T08:55:35","name":"pwm: Consistently define pci_device_ids using named initializers","version":1,"mbox":"http://patchwork.ozlabs.org/series/502627/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2232292/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2232292/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-pwm+bounces-8766-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pwm@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=Zhi0A4bS;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-pwm+bounces-8766-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.b=\"Zhi0A4bS\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.128.51","smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=baylibre.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=baylibre.com"],"Received":["from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8FqG4gP0z1y04\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 04 May 2026 18:55:54 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 9D77930041EA\n\tfor <incoming@patchwork.ozlabs.org>; Mon,  4 May 2026 08:55:51 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 80C2B3491D6;\n\tMon,  4 May 2026 08:55:49 +0000 (UTC)","from mail-wm1-f51.google.com (mail-wm1-f51.google.com\n [209.85.128.51])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id C7716348453\n\tfor <linux-pwm@vger.kernel.org>; Mon,  4 May 2026 08:55:46 +0000 (UTC)","by mail-wm1-f51.google.com with SMTP id\n 5b1f17b1804b1-48a563e4ef7so36121855e9.0\n        for <linux-pwm@vger.kernel.org>; Mon, 04 May 2026 01:55:46 -0700 (PDT)","from localhost\n (p200300f65f114e08f5a4175dadf07882.dip0.t-ipconnect.de.\n [2003:f6:5f11:4e08:f5a4:175d:adf0:7882])\n        by smtp.gmail.com with UTF8SMTPSA id\n 5b1f17b1804b1-48a81ed69fasm367448735e9.3.2026.05.04.01.55.44\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Mon, 04 May 2026 01:55:44 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777884949; cv=none;\n b=ZCkGma2WxJ8Eu5y63P5XLSiZYv8aXqok+lyaCbPtASh6rDFaWlJO/qP0v+wJvdwl4fteAie7nxM2r9XM2Q1RqCfcRDMd0Opm/sX8dUK7OjPxBfy2PctCqjzy79t/mDZ/vIDaVH8uw3pgfqLz0Vhtu6CgPj2yIw88Nse/3quaYWI=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777884949; c=relaxed/simple;\n\tbh=u6mATo/e1r+Ukx/DKDqln9GxkUp9W7jio607Zv/DjRc=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type;\n b=K3sm7plD6yobDBqyosIQg838rG15LYRwPsvLBQ+4rC1cJdxbJRHnsmKtD3LjKcWN1KRu3WHu0i68vDSHP0AWpd/IShCNNOCuzTZrLmKyM5paBU3BL8Uj/KnN5CMzo+3zPfhX7ZKZtlSo1dmJLxnBIFwueD2kSt1mrkIhLeoYsHw=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=baylibre.com;\n spf=pass smtp.mailfrom=baylibre.com;\n dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.b=Zhi0A4bS;\n arc=none smtp.client-ip=209.85.128.51","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1777884945;\n x=1778489745; darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=MoKD3u/P7UWb06HoFd5XqFSOpzUYaTGGs4rM66GhRMM=;\n        b=Zhi0A4bS+1/YIUs6mmRpZWIcvQ71PaG+e5LDdw2Iq1ZoR3sJP5nwVu5dw3tKEKWoxK\n         ohxPl+1ax2CuAxHGJO3v2yoEk5AcjPWE40SX+ErxAtII8r00V7kxISCnC5U5LUtGeB+j\n         1Vlt/sQVhmJM10vAUOPCiPAcHxXxHIJsL/ZehVhPJhuAT8ln9UMFbKCRDFUWnI2jmuej\n         Snd4/5wWWJPqha4OzLcXWyINWE/cvz8uATS2rN0euKHMte47GJIPlGIJCLG0I7kt5SGz\n         vNUt9nSVmC1N1Ttt1bdVBU0nzD4Y7TBfjIraRBO1kHPsYk8j3YbFgF/inaRg1mxh8tFk\n         QZ9g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1777884945; x=1778489745;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=MoKD3u/P7UWb06HoFd5XqFSOpzUYaTGGs4rM66GhRMM=;\n        b=V/Gu1qy1tgBS4aH3bMXixbJbDn3sm1sgOkZSq1P0vHUPDbRmKNhRSh5TeVXs0yjNr9\n         8qXZkyPYZSXu7spvYgWGqIIsC3PpOZ5U2oqy8tEoYb59XwWCFr5KBCZ66xFbwy5E240T\n         2siM7zeDDsZwGAHt7bI7m5hAviHWhka/zlCFO/n0MN64UNIN7AJVNXaiuL/dHZ+wcW54\n         7e6CvkbhaYEMAXYDUUDiu+68lAslmQNlgZSTzFTd48NVdsApEHUsgu9T/IwCWvmf83BJ\n         KgoXqxisCmr+UseYQMhMkAgzRNvZQPmNwMwh2MfJlicLUBPb2xepHj12oQVv3WugYCnV\n         xBfQ==","X-Gm-Message-State":"AOJu0Yw8szGFmrFq50MZK7CG6nInIRK2d+e9LmRABjPp65g0DhqcvcLl\n\tJ8HshC3cRzivgh47fR4/QA7Z7xXWr2Sgpys2mzyDMyYZKgJSg9ogbwaRJYfXvAodw9/5jjcIWdo\n\tI1ISN","X-Gm-Gg":"AeBDiespQabTqu0+iQ+6eHw9yBVzOPZ1cPMdNGaPp1Z9lYTuqrlG5MnYKMUuDNhQOFM\n\tRGAaEAbt3lQmcfEqrIZNbtSzWw0HrFMil3z6OMfI4xWQWjaQgBYCv+xjIrs6T+A9vIBThWJ5/Vb\n\tad/ipKM8f0Me4c+g3SxZ0x8sOwygiYF1POP4lDxvr568+p40864TXuCFVWU+fHjJSBIQyFJ6X+G\n\tZHtCAsqrfZGmntCpj9YRIsug1i0NkLm14Z960s/jiyn8VUT6fSz3xRFPtQ/nTkpPjrpN1vzFTFY\n\t/SB0pwhUYYfTJnSwi0U5HGgaQ+5KXlvxmxGrnQI9ms9E7dVXSFXMCX6LmDLemAq8b71mqx5PTBS\n\tX5VrKCYhjT6G6RvJQhQGYzb/fZ5lNFfXkgGOjXy2AOIDFTZrMGUN1kGxFhS136H9cGlABkAN2sZ\n\txG4cD+jk56fFlFy8rAkUwsxYIQjPNbE5BExmZo140ZN6FXX2iav9WMXAWe5V2jtzPtkt549S4XX\n\tGqjg51DU9qHejF/ScSlMPHbAg==","X-Received":"by 2002:a05:600c:34d2:b0:488:c80c:c236 with SMTP id\n 5b1f17b1804b1-48d10707482mr22033135e9.5.1777884945082;\n        Mon, 04 May 2026 01:55:45 -0700 (PDT)","From":"=?utf-8?q?Uwe_Kleine-K=C3=B6nig_=28The_Capable_Hub=29?=\n <u.kleine-koenig@baylibre.com>","To":"linux-pwm@vger.kernel.org","Cc":"Markus Schneider-Pargmann <msp@baylibre.com>,\n\tlinux-kernel@vger.kernel.org","Subject":"[PATCH] pwm: Consistently define pci_device_ids using named\n initializers","Date":"Mon,  4 May 2026 10:55:35 +0200","Message-ID":"<20260504085535.1914668-2-u.kleine-koenig@baylibre.com>","X-Mailer":"git-send-email 2.47.3","Precedence":"bulk","X-Mailing-List":"linux-pwm@vger.kernel.org","List-Id":"<linux-pwm.vger.kernel.org>","List-Subscribe":"<mailto:linux-pwm+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pwm+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","X-Developer-Signature":"v=1; a=openpgp-sha256; l=5378;\n i=u.kleine-koenig@baylibre.com; h=from:subject;\n bh=u6mATo/e1r+Ukx/DKDqln9GxkUp9W7jio607Zv/DjRc=;\n b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBp+F8IqrWX1yQR1SZsFoBE3S26SrGb44t0x6CVi\n wWtCvLp80eJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCafhfCAAKCRCPgPtYfRL+\n TsyiB/4+37iQjYVB/TtfKU8sBxPt5RD3TTkU7Q3RBWf4D3kpSONtYcLcYe+M2TKkxOyUrNefFem\n 1CYw18Xei1T1fgV4lPAcfCBOFzzhHUC1Wr+ugnGeFLJmVpgWzWiIBSyb5gnAqFn3P30fz/PL+P5\n BmOa6t6Jm+rUpPYYFFcv+9MCGoud+JE0FU0FsPO5iQjPRWgxWRhEwnLhN7Q4tfvf/WmL71V19T4\n O3lYu3xQi4JXY3M6HpHtESoV8spPD2+r6wJ0ZPrdNbvk5t6cuhUybtBWwNoZesrxwTx2J0fHsyn\n lI40CRPBkBxNriiu/ht3AfyimD7beIQ4M9ChbXLzUCNMJQWF","X-Developer-Key":"i=u.kleine-koenig@baylibre.com; a=openpgp;\n fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6","Content-Transfer-Encoding":"8bit"},"content":"The .driver_data member in the various struct pci_device_id arrays were\ninitialized by list expressions. This isn't easily readable if you're\nnot into PCI. Using named initializers is more explicit and thus easier\nto parse.\n\nThe secret plan is to make struct pci_device_id::driver_data an\nanonymous union (similar to\nhttps://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/)\nand that requires named initializers. But it's also a nice cleanup on\nits own.\n\nThis change doesn't introduce changes to the compiled pci_device_id\narrays. Tested on x86 and arm64.\n\nSigned-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>\n---\nHello,\n\nthe mentioned follow-up quest allows to do\n\n-\t{ PCI_VDEVICE(INTEL, 0x0ac8), .driver_data = (unsigned long)&pwm_lpss_bxt_info },\n+\t{ PCI_VDEVICE(INTEL, 0x0ac8), .driver_data_ptr = &pwm_lpss_bxt_info },\n\nwhich gets rid of a bunch of casts and so brings a little bit more type\nsafety. This patch is a preparation for that.\n\nBest regards\nUwe\n\n drivers/pwm/pwm-dwc.c      |  2 +-\n drivers/pwm/pwm-lpss-pci.c | 18 +++++++++---------\n 2 files changed, 10 insertions(+), 10 deletions(-)\n\n\nbase-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731\nprerequisite-patch-id: a31e1d7b9e6310e9c453afcd2037468686cb552c\nprerequisite-patch-id: 7779c63f16ef6f7247cdb71c89e66b27e299eb74\nprerequisite-patch-id: 6f920b6f8c31dc0ad1689200c37680755c20ce8b\nprerequisite-patch-id: 1fd68e883664147052540eea19769ea9e92d0138\nprerequisite-patch-id: fff07090df18a39a361bbb091a3f17223b4606b4\nprerequisite-patch-id: d0d54f7acecd560cdeb6ea0c0e5ae77a50695d68\nprerequisite-patch-id: 5011234352b266242ce01fd8babbf0459bfb005b\nprerequisite-patch-id: a935aab66aa9896437ab9d757ef9fdc859d22495\nprerequisite-patch-id: 344256383ec67df7fbbb6e35e4301d3d14b2571f\nprerequisite-patch-id: 14c277a51a268cdcb630d888c1bad3334018d11c\nprerequisite-patch-id: 93f14fa1ae7c71a1389488e87bf5d4ba8dbddf84\nprerequisite-patch-id: efe5e069be2c0c039e895fb10bbbf6510fd773e6\nprerequisite-patch-id: 21ac68c87f24f9e1d35f3268c04e5b40f93849c7\nprerequisite-patch-id: 84fb61dca584c253aa2e461e97df8aad59159c28\nprerequisite-patch-id: 8e7cee5cc55dd50271326313cb258934dd8c3579\nprerequisite-patch-id: 38526e2d87a08a78ccdefaf3261751220d645f15\nprerequisite-patch-id: e608a54ff3511d5345f0b396fd5d8e9b003b31ec\nprerequisite-patch-id: 4a715d89f621a2ffb364abeb15db3fa2b9b83317\nprerequisite-patch-id: 6d049443e6399e1266e06ba412601308b0e44cdc\nprerequisite-patch-id: a42f44b27a7bf3795c177fd5df47258463114c9d\nprerequisite-patch-id: d8b8fe8728706b0abdae18fa7a77fbb50db89aab\nprerequisite-patch-id: 2c85231c5c460bdbe3293d275e6e7b9c135a5e7d\nprerequisite-patch-id: 60892ec2e01f3559dfb6791d3f13035d46b01ebb\nprerequisite-patch-id: ed9523b310540069539cab89374600fd0b23a043\nprerequisite-patch-id: 3619058b0eb67d71f94ae209ea44f7e6645594de\nprerequisite-patch-id: a867be2bb1f4f5afeaf4effbcbf1a3b3d32655bb\nprerequisite-patch-id: 1a8c38d82ef577bedd1a665b130dde53ca32fb65","diff":"diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c\nindex 86b72db58741..49609d132fda 100644\n--- a/drivers/pwm/pwm-dwc.c\n+++ b/drivers/pwm/pwm-dwc.c\n@@ -147,7 +147,7 @@ static int dwc_pwm_resume(struct device *dev)\n static DEFINE_SIMPLE_DEV_PM_OPS(dwc_pwm_pm_ops, dwc_pwm_suspend, dwc_pwm_resume);\n \n static const struct pci_device_id dwc_pwm_id_table[] = {\n-\t{ PCI_VDEVICE(INTEL, 0x4bb7), (kernel_ulong_t)&ehl_pwm_info },\n+\t{ PCI_VDEVICE(INTEL, 0x4bb7), .driver_data = (kernel_ulong_t)&ehl_pwm_info },\n \t{  }\t/* Terminating Entry */\n };\n MODULE_DEVICE_TABLE(pci, dwc_pwm_id_table);\ndiff --git a/drivers/pwm/pwm-lpss-pci.c b/drivers/pwm/pwm-lpss-pci.c\nindex ae25d9321d75..3a0fd6593520 100644\n--- a/drivers/pwm/pwm-lpss-pci.c\n+++ b/drivers/pwm/pwm-lpss-pci.c\n@@ -48,15 +48,15 @@ static void pwm_lpss_remove_pci(struct pci_dev *pdev)\n }\n \n static const struct pci_device_id pwm_lpss_pci_ids[] = {\n-\t{ PCI_VDEVICE(INTEL, 0x0ac8), (unsigned long)&pwm_lpss_bxt_info},\n-\t{ PCI_VDEVICE(INTEL, 0x0f08), (unsigned long)&pwm_lpss_byt_info},\n-\t{ PCI_VDEVICE(INTEL, 0x0f09), (unsigned long)&pwm_lpss_byt_info},\n-\t{ PCI_VDEVICE(INTEL, 0x11a5), (unsigned long)&pwm_lpss_tng_info},\n-\t{ PCI_VDEVICE(INTEL, 0x1ac8), (unsigned long)&pwm_lpss_bxt_info},\n-\t{ PCI_VDEVICE(INTEL, 0x2288), (unsigned long)&pwm_lpss_bsw_info},\n-\t{ PCI_VDEVICE(INTEL, 0x2289), (unsigned long)&pwm_lpss_bsw_info},\n-\t{ PCI_VDEVICE(INTEL, 0x31c8), (unsigned long)&pwm_lpss_bxt_info},\n-\t{ PCI_VDEVICE(INTEL, 0x5ac8), (unsigned long)&pwm_lpss_bxt_info},\n+\t{ PCI_VDEVICE(INTEL, 0x0ac8), .driver_data = (unsigned long)&pwm_lpss_bxt_info },\n+\t{ PCI_VDEVICE(INTEL, 0x0f08), .driver_data = (unsigned long)&pwm_lpss_byt_info },\n+\t{ PCI_VDEVICE(INTEL, 0x0f09), .driver_data = (unsigned long)&pwm_lpss_byt_info },\n+\t{ PCI_VDEVICE(INTEL, 0x11a5), .driver_data = (unsigned long)&pwm_lpss_tng_info },\n+\t{ PCI_VDEVICE(INTEL, 0x1ac8), .driver_data = (unsigned long)&pwm_lpss_bxt_info },\n+\t{ PCI_VDEVICE(INTEL, 0x2288), .driver_data = (unsigned long)&pwm_lpss_bsw_info },\n+\t{ PCI_VDEVICE(INTEL, 0x2289), .driver_data = (unsigned long)&pwm_lpss_bsw_info },\n+\t{ PCI_VDEVICE(INTEL, 0x31c8), .driver_data = (unsigned long)&pwm_lpss_bxt_info },\n+\t{ PCI_VDEVICE(INTEL, 0x5ac8), .driver_data = (unsigned long)&pwm_lpss_bxt_info },\n \t{ },\n };\n MODULE_DEVICE_TABLE(pci, pwm_lpss_pci_ids);\n","prefixes":[]}