Received: by 2002:ab2:644:0:b0:1ec:cbc4:63fb with SMTP id 4csp1140627lqn; Mon, 26 Feb 2024 08:47:18 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX9ZaXdfKA8dA9JuFM3KqxIB7ml8B+2byQpmrPSIAzKvh2R7/JT9iTPxtZf0XjstijQaPYkcoPrdZq2zM//HcVEKK+OVU8d7asC05Bgrg== X-Google-Smtp-Source: AGHT+IHSPVs6qIQUOeIM3MKi59gR2WgTLIn4ieeYGceU2uzLsMBW5kriw3DGkIDBav1JNOu50ANK X-Received: by 2002:a17:90a:fd8c:b0:296:e8e3:13c7 with SMTP id cx12-20020a17090afd8c00b00296e8e313c7mr10019714pjb.10.1708966038046; Mon, 26 Feb 2024 08:47:18 -0800 (PST) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id np13-20020a17090b4c4d00b0029ad40bf9adsi827351pjb.122.2024.02.26.08.47.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 08:47:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81858-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-81858-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81858-linux.lists.archive=gmail.com@vger.kernel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 73ECEB2CBA4 for ; Mon, 26 Feb 2024 16:02:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 559F312C803; Mon, 26 Feb 2024 16:02:03 +0000 (UTC) Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) (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 0D18112BF3C; Mon, 26 Feb 2024 16:02:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708963322; cv=none; b=WTLwndwgzUUi8q0BpNBNaZFfwGCDdZ69Wy+QwxGTrjiX5WX4bHxyUtOJhii/Km67HY/Vnzh0OcnX0Rh3f5GUAuq3s+DXGpgYNLl8W2RS7oi6iWiomR4CbUR0SezI41VH7gb/i+34c+K/L4G2Js8AVpvvaAZdnv2R1Hzou3fYbZk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708963322; c=relaxed/simple; bh=z1qeTpEjMEfc2m6/6tnNBSOhd7axsMR5VpVy+elxQ20=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=AT+t/SM0FZYA78VGuenK8QkrwyT7JoUkyDl1uYODhCnclN2ha3hoMLFeFVtPCfFeRgEiAdKCgNXnx9BeVVVvnlFwgzQLyJl85objJyO4Jgr/u1dWkenCRqXXTT6P4KfsLgQFoV8O3mh/mmrEBZNwIfcs7gE0j3hskl914PBNnHU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-607e54b6cf5so21992767b3.0; Mon, 26 Feb 2024 08:02:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708963319; x=1709568119; 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=oYLdQGeG0+orphpmC7yUAHvEglcSX2xBetFEu0Q3iXQ=; b=OUrsjVLO1WFlPifNNYrpZzOeqsGt84XY5/43PsYF6D16Gp6YplrY2UNwUgUgI2Pb7U lQCA+4a/z1oNWP666dOa0BAGiqEMgD3I8AgOY6JUM3I5/ZFCZ9x5Yso93MZ0uxF4U61D YARAXbYyX2UuHfCZiUKGIsM7vycFNP6XYrBvri/AxtOIrPqbpvNZoXml4BaFa5cRtMYT nfRlKRTMJ/TGb2hnvn3O2nrmAwZrDcHE6WQPiYzVo0TRPKfz6+ZRQhFWG/Qs9pypVwK4 4SIQMLHM/lyPnTINMqlGvuhgi6PJ9pBpDasCGVoDBOlMVOfsfFAQNm9R9vHByGrVmS1Y TFGQ== X-Forwarded-Encrypted: i=1; AJvYcCVOa2ED2kO9hQTiWh27SW023CGNGgrv3xP6Ekc56gU3vioZszupeISrzjIY5H6DUjhGaynd8n6OV13AnPvS6orLxPKcLM5yUP1y8HKGxvVOIxYJRvkTNQ/wgtp2IocwKVqrgQNi3jemVQ== X-Gm-Message-State: AOJu0YyCMPomDNM7/6jnKl76pDRTvuKLTeKYX2dO1z884MiI6n6+oSPm lOPmWH8Gs4zbHCOKxIVi47FP7UYB7NwD9Qa8BplBPelcBzouwgEAJfpdXkOqYMw= X-Received: by 2002:a81:ae62:0:b0:608:b1eb:f631 with SMTP id g34-20020a81ae62000000b00608b1ebf631mr3888836ywk.3.1708963318708; Mon, 26 Feb 2024 08:01:58 -0800 (PST) Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com. [209.85.219.169]) by smtp.gmail.com with ESMTPSA id f187-20020a0dc3c4000000b00607bc220c5esm1232202ywd.102.2024.02.26.08.01.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Feb 2024 08:01:58 -0800 (PST) Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-dbed179f0faso1799401276.1; Mon, 26 Feb 2024 08:01:58 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUnqaGkn8K7XmgE2pg4xd08EDjclbV+BGwoJwieYPvQ3KJTDhx6gbcL7SKPFUVQb5AeFyOzpget+i77N1dSwGRaI5Eb1s1X15HqDQxDj/No6eAn4f5NuRqSs1TulTyewRHNR9rVN11o2Q== X-Received: by 2002:a25:e0ce:0:b0:dc6:e7f6:254a with SMTP id x197-20020a25e0ce000000b00dc6e7f6254amr4561945ybg.8.1708963318051; Mon, 26 Feb 2024 08:01:58 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240219170337.2161754-1-andriy.shevchenko@linux.intel.com> <20240219170337.2161754-10-andriy.shevchenko@linux.intel.com> In-Reply-To: <20240219170337.2161754-10-andriy.shevchenko@linux.intel.com> From: Geert Uytterhoeven Date: Mon, 26 Feb 2024 17:01:46 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 9/9] auxdisplay: Add driver for MAX695x 7-segment LED controllers To: Andy Shevchenko Cc: Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robin van der Gracht , Paul Burton Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Andy, On Mon, Feb 19, 2024 at 6:03=E2=80=AFPM Andy Shevchenko wrote: > Add initial driver for the MAX6958 and MAX6959 7-segment LED > controllers. > > Signed-off-by: Andy Shevchenko Thanks for your patch! LGTM, so Reviewed-by: Geert Uytterhoeven > --- /dev/null > +++ b/drivers/auxdisplay/max6959.c > +static void max6959_disp_update(struct work_struct *work) > +{ > + struct max6959_priv *priv =3D container_of(work, struct max6959_p= riv, work.work); > + struct linedisp *linedisp =3D &priv->linedisp; > + struct linedisp_map *map =3D linedisp->map; > + char *s =3D linedisp->buf; > + u8 buf[4]; > + > + /* Map segments according to datasheet */ > + buf[0] =3D bitrev8(map_to_seg7(&map->map.seg7, *s++)) >> 1; > + buf[1] =3D bitrev8(map_to_seg7(&map->map.seg7, *s++)) >> 1; > + buf[2] =3D bitrev8(map_to_seg7(&map->map.seg7, *s++)) >> 1; > + buf[3] =3D bitrev8(map_to_seg7(&map->map.seg7, *s++)) >> 1; for (unsigned int i =3D 0; i < linedisp->num_chars; i++) { ... } > + > + regmap_bulk_write(priv->regmap, REG_DIGIT(0), buf, ARRAY_SIZE(buf= )); linedisp->num_chars > +} > +static int max6959_i2c_probe(struct i2c_client *client) > +{ > + struct device *dev =3D &client->dev; > + struct max6959_priv *priv; > + int ret; > + > + priv =3D devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + priv->regmap =3D devm_regmap_init_i2c(client, &max6959_regmap_con= fig); > + if (IS_ERR(priv->regmap)) > + return PTR_ERR(priv->regmap); > + > + ret =3D max6959_power_on(priv); > + if (ret) > + return ret; > + > + ret =3D linedisp_register(&priv->linedisp, dev, 4, &max6959_lined= isp_ops); + device_property_read_u32(dev, "display-width-chars", ...) handling. Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds