Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2617341rwd; Wed, 14 Jun 2023 05:28:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5AiTOcdHPN6hfz21BaCJEmBB0nnflLAWPnfj9dhKaLVkYtoso1NSZLh9e8CNnX2pzMoyvy X-Received: by 2002:a05:6808:d4e:b0:39a:abe8:afb9 with SMTP id w14-20020a0568080d4e00b0039aabe8afb9mr12617213oik.42.1686745690882; Wed, 14 Jun 2023 05:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686745690; cv=none; d=google.com; s=arc-20160816; b=XcPBUjU/+6p0qcqboWlDzS2SgiieTTeEVRoJIT8dWyqugaod3yeshes2D/vTB2dAnV 0njMmH9qbYT3bv6BEAvhGPcSQw3xWrwahB2l6I93NYqzSMwtTT84GIB3gNw75VvN0kF7 B3KHDFd0Is5h7zaMunPGlOb8dAFAsaa+r3PbQzbgY0skERBElcT4lvb+KqDuKv6gY3gj bl+eANllm4/gYXqwq+s3ZyZRAnab+vYAGiFko5T6O1ol5nMXNM7NV1DeLkGNmC1Oj6PH qydoZc2A1XCfRKGLNS0bRDsEbObNurws2DRFk7zVXZso0sl5ckOJgQHunaT3M6/KfnBY phkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=XlQ2c1vFzSQ4Ky097OcuofnmmUJ2a9HFWPyJAfaUwp0=; b=Z57+CsHhaLyFDHzAHHfxbkIcWzsmfTZ4wQnZtquH4VMgvuEmEBJDBq7e80bQ2Qta/H 18gaF+WNNIP6gAVuqegYq+TtFFOv5r7Z39WHGObBzqGSezPfPcSCT2cINZhihSqJIHCe dfCK0J6S2fvAyYIf/V6bFgTBjvr6Rkfr1+OwNoZq1qt5pFoMgRv4XBQkDXvjTq7YD/Yq uMj38MMn8Tp9rZnfyA4ZoX/mc97PAIQDg6id6wN/HLVoG2HnCxuEYX2mYhjyNaOtTvqZ WhpG+bqdmqdl9nrHmE9ii47JGAPxoSxTF3dAOOYOqslJDxg0bATvrbtTyrB/0WiSKFaK fDow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Dy0o6HyO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v14-20020a17090a898e00b002569094c00dsi12405767pjn.120.2023.06.14.05.27.52; Wed, 14 Jun 2023 05:28:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Dy0o6HyO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235189AbjFNMO6 (ORCPT + 99 others); Wed, 14 Jun 2023 08:14:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244007AbjFNMOa (ORCPT ); Wed, 14 Jun 2023 08:14:30 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51C461BF3; Wed, 14 Jun 2023 05:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686744847; x=1718280847; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Zu0EJm0A4E/r52S2oZKehz3Y6IyIfevP7ODvoSpOeSk=; b=Dy0o6HyOj4oDV/wm/y24qF3NwowzdcRkGJcAdY5/MYSzXz3Wp0/GdQqh yrvLwKcsCp8rr1V2f3m0jfLGZPNwEWdKDUEW4R4OyAmOwIClJhu1ZkqG9 KlfCUxQrRBjkKmXCV7DwW/adGowWALe3IrKTCFePkr4htAFwwI3P+PgdR Xfo2yEJu0aM+XvrE9W2DuNV2VhXLhlM1P4/0XQ7Nn+WZzEQYQISqJ8Mpv 7T4SQ5N8M9+Z2Q1fiEwf3nnMk6YriidNm88CzhP+1kDCxVXAe0qirvzUK bOt3iDR3nHsgTzz4E87dkx1gIwpxT2iwqTXIKwHRsjJp062A5UsFbZLLI Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="361967482" X-IronPort-AV: E=Sophos;i="6.00,242,1681196400"; d="scan'208";a="361967482" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2023 05:13:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="782064205" X-IronPort-AV: E=Sophos;i="6.00,242,1681196400"; d="scan'208";a="782064205" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga004.fm.intel.com with ESMTP; 14 Jun 2023 05:13:34 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1q9PNV-003hCK-0K; Wed, 14 Jun 2023 15:13:33 +0300 Date: Wed, 14 Jun 2023 15:13:32 +0300 From: Andy Shevchenko To: Rasmus Villemoes Cc: Alessandro Zummo , Alexandre Belloni , devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 8/8] rtc: isl12022: implement support for the #clock-cells DT property Message-ID: References: <20230612113059.247275-1-linux@rasmusvillemoes.dk> <20230613130011.305589-1-linux@rasmusvillemoes.dk> <20230613130011.305589-9-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 14, 2023 at 12:51:47PM +0200, Rasmus Villemoes wrote: > On 13/06/2023 17.25, Andy Shevchenko wrote: > > On Tue, Jun 13, 2023 at 03:00:10PM +0200, Rasmus Villemoes wrote: ... > >> +#define ISL12022_INT_FO_MASK GENMASK(3, 0) > >> +#define ISL12022_INT_FO_OFF 0x0 > >> +#define ISL12022_INT_FO_32K 0x1 > > > > A nit-pick. Are they decimal or bit fields? > > -ENOPARSE. A number is a number. Its representation in C code may be > decimal or hexadecimal (or...). And sure, 0 and 0x0 are different > spellings of the same thing. The data sheet lists the possible values in > terms of individual bits, so I suppose I could even do 0b0000 and > 0b0001, but that's too unusual (even if perfectly acceptable by gcc). What does datasheet define? bits or the value in a 4-bit field? If bits, why don't you put it that way #define ISL12022_INT_FO_OFF 0 #define ISL12022_INT_FO_32K BIT(0) ? It's a nit-pick, of course, but the nuance is that proposed form might give a hint to the reader, current -- not. > > To me seems like the 0x can be dropped. > > Can, but won't, a single hex digit is more natural way to represent a > four-bit field. -- With Best Regards, Andy Shevchenko