From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (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 9B9A42C026F for ; Mon, 16 Mar 2026 14:37:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773671877; cv=none; b=mC5JTxav2fmwjJH4s45PnEJwyNLeaxnpFAyiGjl7pQnQFrY1Yexi/XJjeLaaeBH/FUXpxyh4c0ip9VYN54b+l10D7K6gDW8PDJnfuhPsGWKk+5tDOfZr+tjzm9fVhBw4HLnSCf7mo4bUY0D++zXXXQvMbzF7OGDTgSYTdXqfZLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773671877; c=relaxed/simple; bh=QEkZDrKDOWeWiXzxMJUSgOrMeqvxwgbypS9dfwiP3KA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=e8K2ggFnK/izVTHwNJV3O6monIHbhqMpVWuiaVd+ueKDEyL8uOP4013HWYhtiify3A9/go3SRLMaciTF6hr9WBOZWRjgCxfBcmpDvaafRAszw7YkBY0BhCAdpi/+USohw/kQRCr7IcPk7b/oCGcBjP0GDT10T3/rES2cxvkpJQ0= 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=ErKaFLE3; arc=none smtp.client-ip=209.85.210.44 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 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="ErKaFLE3" Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-7d75ed779bfso4696585a34.2 for ; Mon, 16 Mar 2026 07:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1773671874; x=1774276674; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iwDEjP2RxHALBhf33ZG8/cVMn/100Eoi1woGk3UdmcU=; b=ErKaFLE3cpw6l5AJhfx9+wc+b+0VXESMG9rRmNfhlXxJcYD3RbLntqe330Sj8rORW7 cKdqLp+PPsH26xNIjlyh6F/tbP2evBNWwoC1+fquFA7HrDXDM3kkt7S/C/4jIU+XZYBY RRddlzzGuDlImjNORy9XG34gZRho3DmPX3/A5m1aMDPoIJ9bFMq7QXQ6+axdBCGe9KzC wtsk1HcmGa4w+RJRsn0xXnZhGG0HfwlKzZLJztX89DgUsOgqDfWZAIen4KFAwH5xchqd VdtLRNkT/x4Wa9+QbTMrxGCZiKQhMxMUQYLnx67cmLmT73vlgVFtm872pf7UCRBNplWL fHuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773671874; x=1774276674; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iwDEjP2RxHALBhf33ZG8/cVMn/100Eoi1woGk3UdmcU=; b=p8d/SDYz/vhykyIoqe5EpBkvOW4ePF3vPL2sXQvXab5XBHNs9n0rj/Mtn356Hbp2zi 17dUqSoMeZjrLbUR0x1FLZ6FivmFJ1erY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:5c30:a80b with SMTP id 46e09a7af769-7d782435d06mr8614692a34.4.1773671874450; Mon, 16 Mar 2026 07:37:54 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:e504:a034:1152:a664? ([2600:8803:e7e4:500:e504:a034:1152:a664]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d76ae90586sm13230271a34.22.2026.03.16.07.37.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Mar 2026 07:37:53 -0700 (PDT) Message-ID: Date: Mon, 16 Mar 2026 09:37:53 -0500 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] iio: light: vcnl4035: fix scan buffer on big-endian To: Andy Shevchenko Cc: Jonathan Cameron , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Parthiban Nallathambi , Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260314-iio-light-vcnl4035c-clean-up-scan-buf-v1-1-400d273eb026@baylibre.com> Content-Language: en-US From: David Lechner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/16/26 5:15 AM, Andy Shevchenko wrote: > On Sat, Mar 14, 2026 at 05:18:10PM -0500, David Lechner wrote: >> Rework vcnl4035_trigger_consumer_handler() so that we are not passing >> what should be a u16 value as an int * to regmap_read(). This won't >> work on bit endian systems. >> >> Instead, add a new unsigned int variable to pass to regmap_read(). Then >> copy that value into the buffer struct. >> >> The buffer array is replaced with a struct since there is only one value >> being read. This allows us to use the correct u16 data type and has a >> side-effect of simplifying the alignment specification. >> >> Also fix the endianness of the scan format from little-endian to CPU >> endianness. Since we are using regmap to read the value, it will be >> CPU-endian. > > ... > >> - iio_push_to_buffers_with_timestamp(indio_dev, buffer, >> - iio_get_time_ns(indio_dev)); >> + >> + buffer.als_data = val; >> + iio_push_to_buffers_with_timestamp(indio_dev, &buffer, >> + iio_get_time_ns(indio_dev)); > > Do you have plans to drop this old API as well? > Eventually, yes. My plan is to wait for fixes to go through first.