From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12511263F22 for ; Wed, 2 Jul 2025 11:49:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751456979; cv=none; b=AdPGO9Txd7BgbiH/CcsYmjOdBmBFPN9XJpzh089VWIWyc2CWHq3PGZe+fTh6wss/CsFUs4Z1xUmnmNbPd5K/dU3PpXOS4FLrIgbYGHi32UdUA5BkbPzCMtHs/WIUHh0737ldGnZ3P2Bg8Zyv2iHXVWn4eYSOXnUBqvZRPlmBiYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751456979; c=relaxed/simple; bh=Pvm8li19J1mQkV27wc91GwhHC/LyyLwQOprXDBjZ6z0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KBUBjIkn1z2LWhJBAAfDKGXkJ6wvhS0runyA+8nlZKZZluQYf5/6P8OGpVe71U4YwcGHyPixAcTi3GGC8BqeW4+2Ij9CYe6DMBLCXgrO23HrHCm8XX21U/RuBWT4FZ5LgviXg9qqHBm11AQUGQLXbkYH9B/dDsUW7HW66hHJR10= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Ykv4PeYi; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ykv4PeYi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1751456977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I8fxI19STOiNYkYbv/K0P/oTNJXufNZSWyZwP8sW87E=; b=Ykv4PeYi5NECUjD2ThfjHvbueTAUgHvsdo6QrCZLBifVhGfylRA/fkXKi3kwaWwzAoGYWx XvkPZI1UM4xai2aljUPMlA3RL83+1BBaBn5BOcYU7obEBXEO0uoycihT06THfxjCcZGSJD AMO5jiFWWbfE/ek0DMNFo19lvGkY9Jw= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-458-bOfnVxfLNbON-tTQ41R7rg-1; Wed, 02 Jul 2025 07:49:33 -0400 X-MC-Unique: bOfnVxfLNbON-tTQ41R7rg-1 X-Mimecast-MFC-AGG-ID: bOfnVxfLNbON-tTQ41R7rg_1751456971 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 073641955EC6; Wed, 2 Jul 2025 11:49:31 +0000 (UTC) Received: from [10.45.226.95] (unknown [10.45.226.95]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2E7BF1944CCA; Wed, 2 Jul 2025 11:49:23 +0000 (UTC) Message-ID: <1848e2f6-a0bb-48e6-9bfc-5ea6cbea2e5c@redhat.com> Date: Wed, 2 Jul 2025 13:49:22 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v12 09/14] dpll: zl3073x: Register DPLL devices and pins To: Jiri Pirko Cc: netdev@vger.kernel.org, Prathosh Satish , Vadim Fedorenko , Arkadiusz Kubalewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Jonathan Corbet , Jason Gunthorpe , Shannon Nelson , Dave Jiang , Jonathan Cameron , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Michal Schmidt , Petr Oros References: <20250629191049.64398-1-ivecera@redhat.com> <20250629191049.64398-10-ivecera@redhat.com> Content-Language: en-US From: Ivan Vecera In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 On 02. 07. 25 12:57 odp., Jiri Pirko wrote: > Sun, Jun 29, 2025 at 09:10:44PM +0200, ivecera@redhat.com wrote: > > [...] > >> +/** >> + * zl3073x_dpll_device_register - register DPLL device >> + * @zldpll: pointer to zl3073x_dpll structure >> + * >> + * Registers given DPLL device into DPLL sub-system. >> + * >> + * Return: 0 on success, <0 on error >> + */ >> +static int >> +zl3073x_dpll_device_register(struct zl3073x_dpll *zldpll) >> +{ >> + struct zl3073x_dev *zldev = zldpll->dev; >> + u8 dpll_mode_refsel; >> + int rc; >> + >> + /* Read DPLL mode and forcibly selected reference */ >> + rc = zl3073x_read_u8(zldev, ZL_REG_DPLL_MODE_REFSEL(zldpll->id), >> + &dpll_mode_refsel); >> + if (rc) >> + return rc; >> + >> + /* Extract mode and selected input reference */ >> + zldpll->refsel_mode = FIELD_GET(ZL_DPLL_MODE_REFSEL_MODE, >> + dpll_mode_refsel); > > Who sets this? WDYM? refsel_mode register? If so this register is populated from configuration stored in flash inside the chip. And the configuration is prepared by vendor/OEM. >> + zldpll->forced_ref = FIELD_GET(ZL_DPLL_MODE_REFSEL_REF, >> + dpll_mode_refsel); >> + >> + zldpll->dpll_dev = dpll_device_get(zldev->clock_id, zldpll->id, >> + THIS_MODULE); >> + if (IS_ERR(zldpll->dpll_dev)) { >> + rc = PTR_ERR(zldpll->dpll_dev); >> + zldpll->dpll_dev = NULL; >> + >> + return rc; >> + } >> + >> + rc = dpll_device_register(zldpll->dpll_dev, >> + zl3073x_prop_dpll_type_get(zldev, zldpll->id), >> + &zl3073x_dpll_device_ops, zldpll); >> + if (rc) { >> + dpll_device_put(zldpll->dpll_dev); >> + zldpll->dpll_dev = NULL; >> + } >> + >> + return rc; >> +} > > [...] >