From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756405AbbLWL1Z (ORCPT ); Wed, 23 Dec 2015 06:27:25 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:56561 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754907AbbLWL1Y (ORCPT ); Wed, 23 Dec 2015 06:27:24 -0500 Date: Wed, 23 Dec 2015 19:23:38 +0800 From: Jisheng Zhang To: , , Subject: [RFC] spi: dw: support setting tmode dynamically Message-ID: <20151223192338.128e95a4@xhacker> X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-12-23_09:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1507310008 definitions=main-1512230178 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, Currently the spi-dw tmode is fixed to SPI_TMOD_TR if cs_control is NULL, but we need to set it as SPI_TMOD_EPROMREAD to read nor flash, my solution is to add and export one functions to set the tmode, then the nor flash driver call it before reading and set back to SPI_TMOD_TR after done. Is there any elegant solution from SPI framework? Any suggestions are appreciated! Thanks, Jisheng