From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C1A2916FF4E; Thu, 9 Jan 2025 17:15:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736442930; cv=none; b=Qm4cGHlTcpHBJX+b9cyCcRQ6k2tuZHbnHbe5xkql/Odnev9Oo3YMpFPcOzfLttjE7DH5q4dsq8w91t3E5LL/u5kfj88kAAXcNpPBRJoesUqynpG+eLA+1qPwIwe2pfYuvfMjyuxqKjvr114n3Q4wrFMyh2ZQohSAtnQssBX8gNA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736442930; c=relaxed/simple; bh=3HlqvF1gFu/ouXfon4HTvBR/I+5OhI7gGNbobwdgUWk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FPtM8pCng6CBZr1s8UL5Q8iEwc9fJ83XMFBDcsPXNI7/rEa45olvhzj3lf7RMoCPDzu2Al55XB5estOr3dlE2UoGDnSL6+NlrsEtqdP2P97ft1GChyo0KW+OOaNyiugIXqAvsgtscH7Ti0NrjcaSwmz827dW182lyGSCkVN525E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NDNegEXI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NDNegEXI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC03FC4CEE1; Thu, 9 Jan 2025 17:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736442930; bh=3HlqvF1gFu/ouXfon4HTvBR/I+5OhI7gGNbobwdgUWk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NDNegEXI702D2udL3wNx6CfldwqoekpJ2rRwAlWiJZl095k7XoTxDBhSQXF17ZTp6 h65IjeIkUPFLVw9bmIgOPGTd3qwxMvJjOi0g8Rwuy/M2AkspSsalZQ6huOJ+pu2ceF q2ElZ2DKDYYMVBhWCGepZq0fwbrfbymYQAxWCwvh5cXtxRVgQF4baSl0uOiH6yrQ9m UMAyDai6PXmC9YGgjFVqLE4C60uVGnysbpYQtn+4vBI+f6tvfx+rJ0Jbw+dU2t/Tdd 5DwvMFWZjsIGf9avahbyqhKU/md38tyBY77AvAI41PmcPZtXJYF7aI+3wsNvWHh166 n8LZa9iQx7+aQ== Date: Thu, 9 Jan 2025 17:15:23 +0000 From: Daniel Thompson To: Nick Chan Cc: Lee Jones , Jingoo Han , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Helge Deller , Hector Martin , Sven Peter , Alyssa Rosenzweig , dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 2/3] backlight: dwi_bl: Add Apple DWI backlight driver Message-ID: References: <20241211113512.19009-1-towinchenmi@gmail.com> <20241211113512.19009-3-towinchenmi@gmail.com> 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 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Jan 09, 2025 at 11:52:56PM +0800, Nick Chan wrote: > > Daniel Thompson 於 2025/1/8 下晝6:52 寫道: > > On Wed, Dec 11, 2024 at 07:34:38PM +0800, Nick Chan wrote: > >> Add driver for backlight controllers attached via Apple DWI 2-wire > >> interface, which is found on some Apple iPhones, iPads and iPod touches > >> with a LCD display. > >> > >> Although there is an existing apple_bl driver, it is for backlight > >> controllers on Intel Macs attached via PCI, which is completely different > >> from the Samsung-derived DWI block. > >> > >> Signed-off-by: Nick Chan > >> --- > >> drivers/video/backlight/Kconfig | 12 +++ > >> drivers/video/backlight/Makefile | 1 + > >> drivers/video/backlight/dwi_bl.c | 122 +++++++++++++++++++++++++++++++ > > I'd rather this was called apple_dwi_bl.c to match that config options, > > etc. > Still trying to determine the type of the backlight control, I think > it is linear however and I will send a new version when I am more > certain. If you've got an physicalinstance of the backlight then you can get a general idea by comparing levels: 512, 1024, 1536 and 2047. A linear backlight will feel make the gaps feel uneven (e.g. the difference between 1536 and 2047 will look very different to the difference difference between 512 and 1024). A logarithmic backligt will make the perceived brightness intervals between the above all feel pretty similar. Daniel.