Establishing and maintaining concentration gradients that are stable in space and time is critical for applications that require screening the adsorption behavior of organic or inorganic species onto solid surfaces for wide ranges of fluid compositions. In this work, we present a design of a simple and compact microfluidic device based on steady-state diffusion of the analyte, between two control channels where liquid is pumped through. The device generates a near-linear distribution of concentrations. We demonstrate this via experiments with dye solutions and comparison to finite-element numerical simulations. In a subsequent step, the device is combined with total internal reflection ellipsometry to study the adsorption of (cat)ions on silica surfaces from CsCl solutions at variable pH. Such a combined setup permits a fast determination of an adsorption isotherm. The measured optical thickness is compared to calculations from a triple layer model for the ion distribution, where surface complexation reactions of the silica are taken into account. Our results show a clear enhancement of the ion adsorption with increasing pH, which can be well described with reasonable values for the equilibrium constants of the surface reactions.