Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp218118rdh; Wed, 7 Feb 2024 02:45:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKw+mEOW8LsCKm4SW/p+XbDrpn/FteqxoI9ELRRBBdP+//9Y+hc/cx618eJc7yQezh//o8 X-Received: by 2002:ae9:e417:0:b0:783:e3be:9ad1 with SMTP id q23-20020ae9e417000000b00783e3be9ad1mr4937868qkc.17.1707302735819; Wed, 07 Feb 2024 02:45:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707302735; cv=pass; d=google.com; s=arc-20160816; b=CIYWErJbRQkj898E+DUt6ykoRFpTNZV+tp3rh5ArCacmSS0U82lZUXpevv63OJsbJv O0ISjSawEzNqshyl0P7ITInU29LPmOD/LwLMHITH+R5CWjwTUV2EQxOPC1tVzoqfEhsw aI69r9ueJ5fKSxevIXJBJGdDVymePFp0FFMU5DVtFTlAt1iLSg5cZg/gzX9M+od+U0Hn V4PW4jIu/82RJ3q/lYbnGZngDoxhsfYdSj2LVwHhpyeT3ytE51D2G2Gp+l8SiQpUGGGW RjTFiLVTyzikShfRgmrCJmvKpqcBNUJCF0KkC+Ra4mEwVSMBvRdpk9uL4FruCfREa9Xs YNLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=iO1cuzbZEvcOb/xBKlHSWUgxNAB1xNrbQxxqm+U1OtM=; fh=9Pt6DMv/WEnKnTWi2ttGw2qNZ0feGtALaC2uvvSSelw=; b=tZSmTGFb6IaxUjlkNAKkgMwK3G9AfpAVWf01kMGaHzqWbLeIaA8d4UP86PykL0c6bf PQJLs20OVLbH+YXKiy/mDPLfVOQbeisCHngWs0DBPJE60exFCTMLjYNwEv0jxQ6/jvfx LUjB95mjobyo3zZUCA09fgSl6plpoTOpx21vSIlsieirmozx0s9r6EbKUXWMzD7KaNeG PgPF+hHR87Cs4nD2r9hmic/G8jo3TjzIqyyPjdNgWZzUND2NAB9s/Ch6tiu6D9xdtqog +H9ceUnXHxeV62leoMQ8Gwos/pnQ+wC9MsZ0it8JcDQl78pzLj0JxJMOt2LB9qul39O4 2hPA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EtiECEDE; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-56338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56338-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCWzbBdyuccqn6gxgCPiA3uVxXt4zDIaVxP/yHLDhG7MWoel7HW6/otncEiBNZu055cVgXOfjOuGsuCDSeM5vMyT83J/8IHZzpBXKkK7aw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c13-20020a05620a0ced00b007840864042dsi821409qkj.210.2024.02.07.02.45.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 02:45:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EtiECEDE; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-56338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56338-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7C7521C25467 for ; Wed, 7 Feb 2024 10:45:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0313E168DC; Wed, 7 Feb 2024 10:45:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EtiECEDE" Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (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 92E5D14A8E for ; Wed, 7 Feb 2024 10:45:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707302728; cv=none; b=u7Qmi5xD+HYrb4zHSNy9dq6peCXtLgpvxg44K7hCgZwFxLwnL7gm9cQgYMc3Y4uc7XfHQSDzHQIISEnbfqp+Q2AM+qFXk8FzNWyYPKKQUrrlyUSKnGSsX4Fj1Y4IusPpMsNJyEWNprKJppR3RRxl22yEvibDf2oV74G1tmcyz94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707302728; c=relaxed/simple; bh=zx/TbZQKImahNt+7vIsidHWjAMcFHpW7Q2SH672vuPc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=KKojAgaA8guoPf7D0eqksdYQL8Yhb+MEw4l85TSEBLeBQwDsyiXeJQfLb6EHVuqk0J7KfkahKaee1t7rSwY9fhBqd55ycE2OjCrilt9Z55Gxlcfk9vT+bGyVhusgB+cxQIBSLoEJNW7Gcofs5KU7VW7+4JocB2/HDhf6GMicFMU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=EtiECEDE; arc=none smtp.client-ip=209.85.128.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-60486805aa8so5195687b3.0 for ; Wed, 07 Feb 2024 02:45:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707302725; x=1707907525; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iO1cuzbZEvcOb/xBKlHSWUgxNAB1xNrbQxxqm+U1OtM=; b=EtiECEDE0UqcYXS+z1UzJfqXswzfPnmc+QLPnFDi6dxcAp0w+C1LWKrF//Tj5S+031 qhnkBOuxz21Amp9civCrfw9Z36Ke+/ytfbU9ZKWLiQjxlEwHBNiAAFBzNO7PGRDNMKGi gwT+lq0tcarHho5izVjN7BLXBGQ0fMqupVBKh2/MX601AxdkZxA0NkqT2puaS3DvuOI6 10k8iB8EdxjvIAWb/vuhqvbK7WCfcIex8Fq2qwprHZ4Eb5gGDT/nIu6ewBbM9NJ27gc1 ErZmQH/GothZuQuMrsOS82oMZEGWuVCGM1CEJFbK9aeCl02NxmOgWgBUXvr0DkcFqglp NWqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707302725; x=1707907525; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iO1cuzbZEvcOb/xBKlHSWUgxNAB1xNrbQxxqm+U1OtM=; b=XAoTKMuv335VNJIUoynV/boTTdOX/62Wx6ccClwJ5D+HBsX+iXeV0s9zuSgZVRCQtt L1GRg1J2JrZqvI+LbAd3PaXDwyduPr/yOhRl6c7Ixd/Pi8LVBbK7aD5mpDOjmpHiN0Uz tKAL3r4DkbVI6JO4z3ZXYvM6AkmrLua3yw1U96wSMEovEV3GbQvmVTo00fQNUUmbT6mX A3LbvGnc4dR9QJ4DQ/ovxPVR4Yj7AyAKF599qwUF6sKCg+9knEQNZ0enQmJ6hdxHE+9G 9iLPKUmMh0JMBsmnNiYwCHKRHTP9zpXalJFdbmnIJUhObVWBXJuDcxJRY65BxWppUPvo Rs+A== X-Gm-Message-State: AOJu0Yy6MyNDmR/kcsMEFVK+5INf5L5maijuVZ1Pm7YKRa9zuorJ6zNM 0dWlmCWbK7tLFMJn5ShAffmivOVll2FRlXUD9wFqo6w8hD0AcVmDtSNvQfApVRUGq5T3jh+JOFZ S+Pdo3CHP96Qj8RfdHaxqgUopxdikTN2S6ad8vFVZ2NbKceeoVRM= X-Received: by 2002:a25:d050:0:b0:dc6:c3e0:82d1 with SMTP id h77-20020a25d050000000b00dc6c3e082d1mr4143050ybg.60.1707302725545; Wed, 07 Feb 2024 02:45:25 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240201162758.50733-1-brgl@bgdev.pl> In-Reply-To: <20240201162758.50733-1-brgl@bgdev.pl> From: Linus Walleij Date: Wed, 7 Feb 2024 11:45:39 +0100 Message-ID: Subject: Re: [PATCH] gpio: set device type for GPIO chips To: Bartosz Golaszewski , Greg KH Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 1, 2024 at 5:28=E2=80=AFPM Bartosz Golaszewski = wrote: > From: Bartosz Golaszewski > > It's useful to have the device type information for those sub-devices > that are actually GPIO chips registered with GPIOLIB. While at it: use > the device type struct to setup the release callback which is the > preferred way to use the device API. > > Signed-off-by: Bartosz Golaszewski (...=3D > +static struct device_type gpio_dev_type =3D { > + .name =3D "gpio_chip", > + .release =3D gpiodev_release, > +}; > + gdev->dev.type =3D &gpio_dev_type; > gdev->dev.bus =3D &gpio_bus_type; > gdev->dev.parent =3D gc->parent; Looks good to me (TM) but we should run this by Greg so he get the chance to chime in, I doubt he will see it on LKML. FWIW: Acked-by: Linus Walleij Yours, Linus Walleij