Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217503/?format=api
{ "id": 2217503, "url": "http://patchwork.ozlabs.org/api/patches/2217503/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260329-ti-ads7950-facelift-v4-4-c568c508c49a@gmail.com/", "project": { "id": 42, "url": "http://patchwork.ozlabs.org/api/projects/42/?format=api", "name": "Linux GPIO development", "link_name": "linux-gpio", "list_id": "linux-gpio.vger.kernel.org", "list_email": "linux-gpio@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260329-ti-ads7950-facelift-v4-4-c568c508c49a@gmail.com>", "list_archive_url": null, "date": "2026-03-29T22:47:09", "name": "[v4,4/4] iio: adc: ti-ads7950: complete conversion to using managed resources", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "445a3ee13ee4c1e24faaa14c663564108aaae0bd", "submitter": { "id": 695, "url": "http://patchwork.ozlabs.org/api/people/695/?format=api", "name": "Dmitry Torokhov", "email": "dmitry.torokhov@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260329-ti-ads7950-facelift-v4-4-c568c508c49a@gmail.com/mbox/", "series": [ { "id": 497938, "url": "http://patchwork.ozlabs.org/api/series/497938/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=497938", "date": "2026-03-29T22:47:07", "name": "ti-ads7950: fix gpio handling and facelift", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/497938/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217503/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217503/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-gpio+bounces-34375-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-gpio@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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=cfewBTZe;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-gpio+bounces-34375-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"cfewBTZe\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=74.125.82.180", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fkV3Q6X46z1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 30 Mar 2026 09:50:58 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 8014F303C01D\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 29 Mar 2026 22:47:23 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 24369372B59;\n\tSun, 29 Mar 2026 22:47:23 +0000 (UTC)", "from mail-dy1-f180.google.com (mail-dy1-f180.google.com\n [74.125.82.180])\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 2817237BE64\n\tfor <linux-gpio@vger.kernel.org>; Sun, 29 Mar 2026 22:47:18 +0000 (UTC)", "by mail-dy1-f180.google.com with SMTP id\n 5a478bee46e88-2c54c68db4dso1391309eec.0\n for <linux-gpio@vger.kernel.org>;\n Sun, 29 Mar 2026 15:47:18 -0700 (PDT)", "from dtor-ws.sjc.corp.google.com\n ([2a00:79e0:2ebe:8:7265:773a:8e51:c62f])\n by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2c3c7971d97sm5840295eec.30.2026.03.29.15.47.16\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 29 Mar 2026 15:47:16 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774824442; cv=none;\n b=kCKsIgc/Iw9doC7gmS9eX5tfDx2phxs7GTgiIw2Foq02wlTWhWGn8pd72pCkBc11TN2ZDh9uvGPydJ73039XMWUMINNV2JgH9q9+s3ZgdCKhzh/V0S9POUJtBl/rc01Y4icnp1DH3eCteZGmt+w1amcbrgJzESYi6lEoMYvGOw0=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774824442; c=relaxed/simple;\n\tbh=vwpbqrdZWg2IZwLAqAvEpGuR5LpR+6ltHKabiSi+AJE=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=r6NDTF6dKdBI59hQwUbcALVltJX8pSQlCxMAracPQ2pGnJw4C5j4nBB+szo0BmqOrF4Bh39h/SXRRKfEBV5chedw2Kx71aVBUJO/K6KERZ699i/jrSGoNcaNP78biwv1UDTZ8ZS6AG1QbgF+DZmj6dgWIk1ZF1KKo77FszjpjbY=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=cfewBTZe; arc=none smtp.client-ip=74.125.82.180", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1774824437; x=1775429237;\n darn=vger.kernel.org;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to;\n bh=3+M5YsOq3vk2JVYTGrQ8f5AMbXIKgHmkOF2OORVkBAw=;\n b=cfewBTZeel9IF/6M+EKcatDd1aajhVSb5EHkuvat9le936bVm77lu0t9j3HCktW8ah\n o3iflk+1eZPzNsmt/xIifQtLyks/9pu5M5YWo5KvOHaqAloB2H2iPitpNCnxCHwPsm8W\n iMtQDs9oIkcXQmND30JFKYDa77nrxeXOTHayQy5syFNohe9nCSGZZlcIhTLKUgMo7Fjm\n KAT7lCF9pf9OrJEIichFEJ0OHuZXhjuNu9tqiG9hKP1YWDxTcjpkwgk2FuCxJL0pdyBf\n z98LwKgu5Jy4z3IvsVDbt85xhpFgl9ymFn8W7E0ooRb0FCPfhQGMNB5EzCTmqvDfjMAf\n 9ESw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774824437; x=1775429237;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=3+M5YsOq3vk2JVYTGrQ8f5AMbXIKgHmkOF2OORVkBAw=;\n b=Q5OB+RCju1P8o2qTzOskZgnZrAR9J8CuEn7WedHR0BHkn8udo5qX6CXHM3LRNRefLw\n CJBMjUgyXeN9fZKQkTy3Qynyd42VpyMquYCJ6AhKs6b7vMmBNdYhm1Kiqv4Kj9+7f/Kx\n l6IHbjg1jR+ge/yRH8vVfEI/idR7APsy8NRL/831UR3NMzja/deaUNDw02g2G65blR3r\n oQkqByYyVfD9z9BvRPLGFtPMe6Mhb3jISbo/rIPC6D/pyQZQHKWMjUdiCNc/2jI0I17j\n lxpnxusSDQvdLZZ2Edcq3PRDflaLp9Dfk0J6Cs5yUzWVKVHDzuCsF4GHLCtDZWd1CJVf\n suHg==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCXKQgoR35qYBf/n7ABZwliGGAfDcJWRId0SEgkEFg45HTz5Nr8cfJjlaNAxI0wVKZGUDzkwETLpsDsu@vger.kernel.org", "X-Gm-Message-State": "AOJu0YzDnAbkoilbuNxXDpuupQbnNgoO56FzfsPAUiA3GeDtOIlK1j7q\n\taXQ00fV0g8m+oSJsH46aE4IwLgu3QOf5tJJWBipbtkSpohEx/km0Q9aQ", "X-Gm-Gg": "ATEYQzzEDx78y1aLxdLG4WhPap9IB8zdHvy0rtbW4QvKWnig2zLVPSAbp05RkqsdgPZ\n\ttxWSGgBZ/4TzriPO92d8ui+ajVpljYjC5XyUMYexQuPCUYiSh5icXBtAd8c1N2q57v03cz+pKqW\n\t4CSB9FwKurc/jo0b+Z9DL9dIbs4bnDj9ZA+rmleqInaaXvRzqypD8BJ9yhHX7wq5GvAj71ckTIL\n\tJJLDhA/SO2i1tYgfcNVd/nPQ+SlW3HB+Z5tjgaImTL5hLRZ0BMjOvmOkDLb2LohSx5ewlI7496X\n\tsEm2iA/9aS889S8z122178WQYkzspTeQ59hc5nqA6dhgT9BVSExIobAXsFHILSheWglJK4yK4ly\n\tasHCEsKj5g1d2zPR+glErjvMiq3E1Vb8FPaef6rCRMxB20ihwmtRqB/j3mXc2PQIMnnF9iKM+Bj\n\t7gT79G8yY6gQAP81cWsgkwC9MAGMbuWFfkwTkpZiSnGxjTiT6bzFsDGMbftlrI1ft70fZxG+Bvc\n\tWeZx2WK7ykEtNE=", "X-Received": "by 2002:a05:693c:3282:b0:2c0:c96a:a4db with SMTP id\n 5a478bee46e88-2c185d8e84emr5487052eec.4.1774824437396;\n Sun, 29 Mar 2026 15:47:17 -0700 (PDT)", "From": "Dmitry Torokhov <dmitry.torokhov@gmail.com>", "Date": "Sun, 29 Mar 2026 15:47:09 -0700", "Subject": "[PATCH v4 4/4] iio: adc: ti-ads7950: complete conversion to using\n managed resources", "Precedence": "bulk", "X-Mailing-List": "linux-gpio@vger.kernel.org", "List-Id": "<linux-gpio.vger.kernel.org>", "List-Subscribe": "<mailto:linux-gpio+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-gpio+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260329-ti-ads7950-facelift-v4-4-c568c508c49a@gmail.com>", "References": "<20260329-ti-ads7950-facelift-v4-0-c568c508c49a@gmail.com>", "In-Reply-To": "<20260329-ti-ads7950-facelift-v4-0-c568c508c49a@gmail.com>", "To": "Jonathan Cameron <jic23@kernel.org>,\n David Lechner <dlechner@baylibre.com>", "Cc": "=?utf-8?q?Nuno_S=C3=A1?= <nuno.sa@analog.com>,\n Andy Shevchenko <andy@kernel.org>, Linus Walleij <linusw@kernel.org>,\n Bartosz Golaszewski <brgl@kernel.org>, linux-iio@vger.kernel.org,\n linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,\n Jonathan Cameron <Jonathan.Cameron@huawei.com>", "X-Mailer": "b4 0.15-dev-a6826" }, "content": "All resources that the driver needs have managed API now. Switch to\nusing them to make code clearer and drop ti_ads7950_remove().\n\nReviewed-by: David Lechner <dlechner@baylibre.com>\nSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>\n---\n drivers/iio/adc/ti-ads7950.c | 66 +++++++++++++-------------------------------\n 1 file changed, 19 insertions(+), 47 deletions(-)", "diff": "diff --git a/drivers/iio/adc/ti-ads7950.c b/drivers/iio/adc/ti-ads7950.c\nindex 0b98c8e7385d..234249ab76d8 100644\n--- a/drivers/iio/adc/ti-ads7950.c\n+++ b/drivers/iio/adc/ti-ads7950.c\n@@ -506,10 +506,8 @@ static int ti_ads7950_probe(struct spi_device *spi)\n \tspi->bits_per_word = 16;\n \tspi->mode |= SPI_CS_WORD;\n \tret = spi_setup(spi);\n-\tif (ret) {\n-\t\tdev_err(&spi->dev, \"Error in spi setup\\n\");\n-\t\treturn ret;\n-\t}\n+\tif (ret)\n+\t\treturn dev_err_probe(&spi->dev, ret, \"Error in spi setup\\n\");\n \n \tindio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));\n \tif (!indio_dev)\n@@ -517,8 +515,6 @@ static int ti_ads7950_probe(struct spi_device *spi)\n \n \tst = iio_priv(indio_dev);\n \n-\tspi_set_drvdata(spi, indio_dev);\n-\n \tst->spi = spi;\n \n \tinfo = spi_get_device_match_data(spi);\n@@ -573,24 +569,22 @@ static int ti_ads7950_probe(struct spi_device *spi)\n \t\tst->vref_mv = ret / 1000;\n \t}\n \n-\tret = iio_triggered_buffer_setup(indio_dev, NULL,\n-\t\t\t\t\t &ti_ads7950_trigger_handler, NULL);\n-\tif (ret) {\n-\t\tdev_err(&spi->dev, \"Failed to setup triggered buffer\\n\");\n-\t\tgoto error_destroy_mutex;\n-\t}\n+\tret = devm_iio_triggered_buffer_setup(&spi->dev, indio_dev, NULL,\n+\t\t\t\t\t &ti_ads7950_trigger_handler,\n+\t\t\t\t\t NULL);\n+\tif (ret)\n+\t\treturn dev_err_probe(&spi->dev, ret,\n+\t\t\t\t \"Failed to setup triggered buffer\\n\");\n \n \tret = ti_ads7950_init_hw(st);\n-\tif (ret) {\n-\t\tdev_err(&spi->dev, \"Failed to init adc chip\\n\");\n-\t\tgoto error_cleanup_ring;\n-\t}\n+\tif (ret)\n+\t\treturn dev_err_probe(&spi->dev, ret,\n+\t\t\t\t \"Failed to init adc chip\\n\");\n \n-\tret = iio_device_register(indio_dev);\n-\tif (ret) {\n-\t\tdev_err(&spi->dev, \"Failed to register iio device\\n\");\n-\t\tgoto error_cleanup_ring;\n-\t}\n+\tret = devm_iio_device_register(&spi->dev, indio_dev);\n+\tif (ret)\n+\t\treturn dev_err_probe(&spi->dev, ret,\n+\t\t\t\t \"Failed to register iio device\\n\");\n \n \t/* Add GPIO chip */\n \tst->chip.label = dev_name(&st->spi->dev);\n@@ -605,33 +599,12 @@ static int ti_ads7950_probe(struct spi_device *spi)\n \tst->chip.get = ti_ads7950_get;\n \tst->chip.set = ti_ads7950_set;\n \n-\tret = gpiochip_add_data(&st->chip, st);\n-\tif (ret) {\n-\t\tdev_err(&spi->dev, \"Failed to init GPIOs\\n\");\n-\t\tgoto error_iio_device;\n-\t}\n+\tret = devm_gpiochip_add_data(&spi->dev, &st->chip, st);\n+\tif (ret)\n+\t\treturn dev_err_probe(&spi->dev, ret,\n+\t\t\t\t \"Failed to init GPIOs\\n\");\n \n \treturn 0;\n-\n-error_iio_device:\n-\tiio_device_unregister(indio_dev);\n-error_cleanup_ring:\n-\tiio_triggered_buffer_cleanup(indio_dev);\n-error_destroy_mutex:\n-\tmutex_destroy(&st->slock);\n-\n-\treturn ret;\n-}\n-\n-static void ti_ads7950_remove(struct spi_device *spi)\n-{\n-\tstruct iio_dev *indio_dev = spi_get_drvdata(spi);\n-\tstruct ti_ads7950_state *st = iio_priv(indio_dev);\n-\n-\tgpiochip_remove(&st->chip);\n-\tiio_device_unregister(indio_dev);\n-\tiio_triggered_buffer_cleanup(indio_dev);\n-\tmutex_destroy(&st->slock);\n }\n \n static const struct spi_device_id ti_ads7950_id[] = {\n@@ -674,7 +647,6 @@ static struct spi_driver ti_ads7950_driver = {\n \t\t.of_match_table = ads7950_of_table,\n \t},\n \t.probe\t\t= ti_ads7950_probe,\n-\t.remove\t\t= ti_ads7950_remove,\n \t.id_table\t= ti_ads7950_id,\n };\n module_spi_driver(ti_ads7950_driver);\n", "prefixes": [ "v4", "4/4" ] }