Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp652113lqs; Fri, 14 Jun 2024 01:10:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDEDxMyazYiJ3stKNPfF8ygBluyBvZg2qMgxEY/cBoKGRiKmU2pYSz20VdBSTOCCdoOTrdpFcFr7h3ZPcnMjuT5DVCxRTasgrWmCVutQ== X-Google-Smtp-Source: AGHT+IEf9h76hlsrBRCtPSZYChGua0G3Wqd26wU0FQsUDDhwNXpD6cw5OKsdy95HxPA2Ss5AHLr8 X-Received: by 2002:a05:620a:4047:b0:793:6d0:b917 with SMTP id af79cd13be357-798d23e89e6mr211791385a.4.1718352650385; Fri, 14 Jun 2024 01:10:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718352650; cv=pass; d=google.com; s=arc-20160816; b=UvrG1NxbNuSMvDpWuN0sWL7Ui/OgCK/IgKHdnnfcEEJCZmma47KNccjnRTFovI52QC jXHP4Mw/EH1gPLJlsKzjRZzrYHvl2WWnvlpZKFuVWAsjMbzBwxpyJ7M6XMeCuMifgwdD A5u9o6ygHxj2cLc7B1tfpSzwjF3J2EMukOmEo0jJlNq6/xREKw4oCiFnyDUkJGCGDZnN O+NPyaMpu4VOhBX1aks22WMEtbywJuoyefrPLFknTaeQiyGXEm5Zs2zMRfC1Igw2ZAHG w4sICmMmqvPds5c3SfLHWmEQyjycBUKtzPCeBT2RPE4SHYlnwl7wlBaA38hgoZPmH21E uO3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=dQuauHWW6Nhu7VIVhyecgZ9pWHe1Gm4RQ6VrtSN+/jk=; fh=tIaYraN/qA/ZN5Q6ufCl9B6ompRdqcKcm5pqBE6kqOQ=; b=qt4+k+xHpiujrBTqKyaPtJKaWv9H2WRYB2hgkcXH01AspMOnFIhGMZc2jUhT0+JtKm FtNw6+kqsIhqZjJ0pAW+BGCr7VBZ0wGdB/q4dRsd60OV6Nja2E3YLP6byd06TrSGl+fE cLhGLcaNHdEKkIZs0opUeMwx0hbNJuH1fotwun9cdwI1vJGvNDZy41jKANoFqGxMraxK tpeEdrsDIn54ZuO1RHNCM18rHUmBLp4OoE8NpgoTNNffbsPrUGLjAE+wjK2XLZiTQpju UJ7Xar+v3uU39/OQshTOsjAGe5k0OOptUf+WzcDgwb0J9rNdU6uMPWw9UrkGDl0jdD2F 3M1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=uf49o4YU; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-214506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214506-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-798ab902c7fsi308088685a.287.2024.06.14.01.10.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 01:10:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214506-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=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=uf49o4YU; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-214506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214506-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 165B71C21CF5 for ; Fri, 14 Jun 2024 08:10:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E57E81836D7; Fri, 14 Jun 2024 08:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="uf49o4YU" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 494BD1822F8 for ; Fri, 14 Jun 2024 08:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718352644; cv=none; b=otk1wefj2X4VCd5HZliiGYZ8hPlIXJ9ISCOinHRN+CyVfTq5bXj2er3y0KCIuHqUDd4JcBezPU2lonmH+r5FFi0GDgvsVXiUKyfbGdQTQSkeYINc9K1Ekq1WDBmMAVMq2UhHHqKbpckd4lFMir5pGj4VoDGgDF6o5YF2aIjZe70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718352644; c=relaxed/simple; bh=XtY06yQNqFNmqjsRt6dtXpp7Ga45DKbLPLwoxJXu+Kk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=D147PICi7x5WWTJvMXjmkT1gewfKRaBaFzjiwS2CmzPka39W+LsSNxSB6R1Sb/rHHQnIpkRwKRrMrOwNEuBnJ0fXlh+3Ur9YJcJW2K376JtYvZb4awDeunK6/tZOGHMPNsxeVSJ1G/gNyjaAG9nG/fSIz1YuUzlNopZSoyGKqHQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=uf49o4YU; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a63359aaaa6so266507666b.2 for ; Fri, 14 Jun 2024 01:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718352639; x=1718957439; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dQuauHWW6Nhu7VIVhyecgZ9pWHe1Gm4RQ6VrtSN+/jk=; b=uf49o4YUdtYRC1cuqd6I16NAWak3ezlI4cAE146EJbpl/BVrXJeSgOFS62OQQVW50x gebiV6kpFAZsaJHGU9oXcqXKlxSxvC3ZS8sJURtvAp3gDbDbhxuYxJBM1f3w7wSrpLEU Pf7foYSk0RMA4zsQqIjlJrsd2Q+eep0myrxeot6iMIP/8tkKTsbsc+PpTbHRLNCr161Q rlYElRqPr8Yl/D78q5OE7kPADRdLxtXnHqiGbfmgvTm11h/3SDaqPrWUJ8r0D2pCBsIw R4TWlyLn7s0WcMxaewb6eZRli6ob7eyNGrcsNZp6DMX+m4lNJd5VSsfeqOAYDLU2JTpJ sVKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718352639; x=1718957439; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dQuauHWW6Nhu7VIVhyecgZ9pWHe1Gm4RQ6VrtSN+/jk=; b=hcdwv5y7vaLKZp55weHS2HcM1uHw96yVk4ainUZEjJSEkb6IWnEGmdYyKsEt/7xDZR wH53SM6bysM4Xvim7EJrVe8r177dxqH9D/gdGbE028BAXEJdRtSin8x/pKzUa7mdssnA 0T2kLjPIdcsR9cKpWoDdaKJ1kJUJxXBZ/fULvEwTQ2JvMVgVHEh6lNFXNwi6gKlOxRsz seiyvl4aVw/zl4Xaz11JLUKCLW6yI8vp95ysWCIkl0zFMyGDvpAb2VQhyXfP8DQVRucQ 4ZUmkisTm2qzVxOGmb4ZEjUC3djSCr0I58Ej2s31hmlwZGaSN+x+iUfJk2SJItM3K1jk oE4A== X-Forwarded-Encrypted: i=1; AJvYcCXWXlKpKXYZWh43P+Oro0PLE5oDOLKPyWnD7sYDiJNPjYbCszwhit3u8wnWoe8wU7OuVw08EWsmg7UQCg7TgyBEOecehG5/iG4hYFIi X-Gm-Message-State: AOJu0YyMtW6rG20cEtiRL3X+2JczVWt7Q8DKeTqacdMrk2SIvcxF2ggC aX4VW6e0VJCLHjiRNTeZit072vQy4HBV8364zKsSNrmXjKZSUFbpQtFJWlmMrzK3vAeh/I0ZR4w +1x8= X-Received: by 2002:a17:906:138c:b0:a6f:2e28:4008 with SMTP id a640c23a62f3a-a6f60dc572cmr131844766b.54.1718352639612; Fri, 14 Jun 2024 01:10:39 -0700 (PDT) Received: from localhost (p509153eb.dip0.t-ipconnect.de. [80.145.83.235]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f988f9sm156627466b.197.2024.06.14.01.10.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 01:10:39 -0700 (PDT) From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Fabrice Gasnier , William Breathitt Gray , Maxime Coquelin , Alexandre Torgue , Lee Jones Cc: linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] mfd: stm32-timers: Make register definition more flexible Date: Fri, 14 Jun 2024 10:10:10 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1253; i=u.kleine-koenig@baylibre.com; h=from:subject:message-id; bh=XtY06yQNqFNmqjsRt6dtXpp7Ga45DKbLPLwoxJXu+Kk=; b=owGbwMvMwMXY3/A7olbonx/jabUkhrTsX48f8qn9z6i3nvpq/lb/5wZuPQ5SHKzvz7qb9x8N2 OCYfYOpk9GYhYGRi0FWTJHFvnFNplWVXGTn2n+XYQaxMoFMYeDiFICJSDBwMLTPlr2rVuUWNW+2 8t08vd2+dll7nn3JkzF4Uy+rPeVf0M0809/RBawrGJvKSvns6tS/l9gtbbgc/kcqjSnUaFKfDqP Lyikbf8Q+cd4sc/8VpyO7nf6mCX3zZkmYd3JJcxUocLjd4ngeHHTF2k28TLBdnf1JqfCj7L6mZv eEMxyTZpsHa6crfLSOuXp/6aFG5Yu+86r+GGfnrlh3145Jt/6gPXeju/zea76OlX3TZz1PNdj8N v9Eef4cFrkH27ffUTmXuH1vs3MN48tVeY8P7u15pW5/Lo7Hu8jgzJ6D1p7zP24JmNPb2KXcVDwp k/nZZ9N1mxmeeWj4sNi1H3nva3+p5aDdXJemjzuuF3MCAA== X-Developer-Key: i=u.kleine-koenig@baylibre.com; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: 8bit Hello, I'm not sure that everyone will agree the changes in here are worthwhile, but I like them. One surprise is that this makes the generated code for drivers/pwm/pwm-stm32.c more compact (see patch 4 for a bloat-o-meter statistic). I'm surprised because it boils down to gcc not noticing that mask = ((((1UL))) << (1 + 4 * ((1) - 1))) << (ch * 4); is equivalent to mask = ((((1UL))) << (1 + 4 * ((ch + 1) - 1))); . I'm unsure what to suggest for how to merge this series. I have some further changes on my agenda to drivers/pwm/pwm-stm32.c, so either merging this via pwm or a stable branch would be great for me. Best regards Uwe Uwe Kleine-König (4): mfd: stm32-timers: Unify alignment of register definition mfd: stm32-timers: Add some register definitions with a parameter mfd: stm32-timers: Drop TIM_DIER_CC_IE(x) in favour of TIM_DIER_CCxIE(x) pwm-stm32: Make use of parametrised register definitions drivers/counter/stm32-timer-cnt.c | 4 +- drivers/pwm/pwm-stm32.c | 22 ++-- include/linux/mfd/stm32-timers.h | 179 ++++++++++++++++-------------- 3 files changed, 107 insertions(+), 98 deletions(-) base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 -- 2.43.0